Updated on 2025-08-14 GMT+08:00

Modifying a Flow by ID

Function

This API is used to update a flow by ID.

URI

PUT Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/Flow/{flow_id}

Table 1 URI parameter

Parameter

Mandatory

Type

Description

low_id

Yes

String

Explanation

Flow instance ID, which can be queried by calling the API of Querying Flows (id in the response message)

Constraints

None

Value

None

Default value

None

Request Parameters

Table 2 Request parameters

Parameter

Mandatory

Type

Description

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

  • Autolaunched Flow: a flow instance that is automatically started. After the API is called, the logic defined in the Flow model is immediately executed.
  • Event Trigger: A flow that is triggered by an event. The logic defined in the flow model is executed only when the event is triggered. If this type is selected, you must configure events and condition rules.

Default value

Autolaunched Flow

startElement

No

String

Explanation

Start element of the Flow instance.

Constraints

None

Value

None

Default value

None

interviewLabel

No

String

Explanation

Flow instance label.

Constraints

None

Value

None

Default value

None

localUrl

No

String

Explanation

Local URL, which consists of /run/ and the flow name. For example, if the flow name is test_test, the URL is /run/test_test.

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.

formulas

No

Array of object

Explanation

Formula defined in the flow.

Constraints

None

structs

No

Array of object

Explanation

Structure defined in the flow.

Constraints

None

constants

No

Array of object

Explanation

Constants defined in Context of a flow can be used in the flow.

Constraints

None

structVariables

No

Array of object

Explanation

Structure variables.

Constraints

None

objectVariables

No

Array of object

Explanation

Object variables.

Constraints

None

catalogue

No

String

Explanation

Flow category.

Constraints

None

Value

None

Default value

None

private

No

String

Explanation

Whether the flow instance is private.

Constraints

Private flows cannot be called using REST APIs or custom APIs (public APIs).

Value

  • true: private.
  • false: public.

Default value

None

Response Parameters

Table 3 describes the response parameters.

Table 3 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

Error and warning information of the flow instance returned.

Example Request

Modify a flow instance.

PUT https://Huawei Cloud Astro Zero domain name/u-route/baas/metadata/v1.0/Flow/000y000000aM8XixTN0S
{
    "label": "updated label",
    "processType": "Autolaunched Flow"
}

Example Response

{
    "resCode": "XXX",
    "resMsg": "Failure",
    "result": {
        "errors": [
            "string"
        ],
        "warnings": [
            "string"
        ]
    }
}

Status Code

See Status Codes.

Error Code

See Error Codes.