Starting a BPM Instance
Function
This API is used to create and start a BPM instance.
Before starting the BMP instance, ensure that BPM metadata is defined through GUI.
URI
POST Huawei Cloud Astro Zero domain name/u-route/baas/bp/v2.0/runtime/instances
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Explanation BPM name. For details, see Logging In to the Application Designer. Go to the application designer and view the BPM name in the Process > Business Process list. Constraints None Value None Default value None |
version |
No |
String |
Explanation BPM version. A BPM can have multiple versions. If this parameter is not specified, the current version is used. Obtain the version number by performing the following steps:
Constraints None Value None Default value None |
variables |
No |
Object |
Explanation Variables defined in BPM metadata, including custom variables and system variables. The variable is in key-value format, in which key indicates the variable name and value indicates the variable value. To set BPM variables before starting a BPM instance, you can specify this parameter. To set variables during startup, set the system variable $Flow.BusinessKey in variables. To set BPM title, you can set the system variable $Flow.Title. Constraints None |
Response Parameters
Parameter |
Type |
Description |
---|---|---|
resCode |
String |
Explanation Return code. Value If the request is successful, 0 is returned. For details about other error codes, see Error Codes. |
resMsg |
String |
Explanation Message returned. Value If the request is successful, "Success" is returned. In other cases, an error message is returned. |
result |
Object |
Explanation If the request is successful, the running information about the BPM instance after being started will be returned. |
Example Request
POST https://Huawei Cloud Astro Zero domain name/u-route/baas/bp/v2.0/runtime/instances { "name":"createCloudOK_NEW", "version":"1.0.1", "variables":{ "name":"sun", "memorySize":"15", "storageSize":"15", "expiryDate":"2018-12-12" } }
Example Response
{ "resCode":"0", "resMsg":"Success", "result":{ "name":"bpName1", "version":"1.0.1", "id":"002N000000Sy2NphoRbU", "processDefID":"001L000000S8Yi3xG9Gi", "interviewLabel":"BP Label 1", "nextElem":"subProcess", "isTest":true, "state":"Dispatched", "bpStatus":"New", "urgency":0, "taskOutcome":"", "businessKey":"002N000000Sy2NphoRbU", "startTime":"2019-08-27 10:53:04", "endTime":"", "Ext1":"", "Ext2":"", "Ext3":"", "Ext4":"", "Ext5":"", "Ext6":"", "Ext7":0, "Ext8":0, "suspended":false, "isClosed":false } }
Status Code
See Status Codes.
Error Code
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot