Creating a Flow
Function
This API is used to create a flow.
URI
POST Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/Flow
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Explanation The flow name. Constraints None Value Start with a letter and can contain only letters, digits, and single underscores (_). The value cannot use consecutive underscore (_) and cannot end with an underscore. A maximum of 64 characters are allowed. Default value None |
label |
Yes |
String |
Explanation The flow label. Constraints None Value 1–64 characters Default value None |
processType |
Yes |
String |
Explanation Type of the Flow instance. The options are as follows: Constraints None Value
Default value Autolaunched Flow |
startElement |
No |
String |
Explanation Start element of a flow, that is, the name of the first diagram element pointed by the start node. For example, if the diagram element pointed by the start node is script0, the start element of the flow is script0. Constraints None Value None Default value None |
interviewLabel |
No |
String |
Explanation Flow instance label. Constraints None Value None Default value None |
localUrl |
Yes |
String |
Explanation Local URL, which consists of /run/ and the flow name. For example, if the flow name is Namespace__das, set the URL to /run/Namespace__das. Constraints None Value None Default value None |
event |
No |
String |
Explanation Flow event. Constraints This parameter is mandatory when processType is set to Event Trigger. Value None Default value None |
variables |
No |
Array |
Explanation Variables bound to the flow instance. Constraints This parameter is valid only when processType is set to Event Trigger. |
eventCriteria |
No |
String |
Explanation Trigger condition configured for the event involved in a flow. Constraints None Value None Default value 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 flow ID is returned. |
Example Request
POST https://Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/Flow { "label": "das", "name": "t__das", "processType": "Autolaunched Flow", "localUrl": "/run/t__das", "startElement": "", "event": "", "eventCriteria": "", "interviewLabel": "das {!$Flow.CurrentDateTime}" }
Example Response
{ "resCode": "0", "resMsg": "Success", "result": { "errors": [ "startElement in Flow(t__das) is mandatory." ], "id": "000y000000aM8XixTN0S", "warnings": [] } }
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