Update And Trigger Flow

Trigger workflow scheduling with updated parameters (the information of the original workflow is not changed; the updated parameters are only used to generate a workflow instance).

Prerequisites

  • The user must be the owner of the workflow.

  • Both the user and the workflow are not locked.

Request Format

POST https://{apigw-address}/batch-processing-service/v2.1/flows

Request Parameters (URI)

Name

Location (Path/Query)

Required/Optional

Data Type

Description

userId

Query

Required

String

The user ID. How to get userId>>

orgId

Query

Required

String

The organization ID which the user belongs to. How to get orgId>>

action

Query

Required

String

Fixed value: updateAndTrigger

Request Parameters (Body)

Name

Required/Optional

Data Type

Description

flowId

Required

Integer

The workflow ID.

triggerTime

Required

Long

Specify the trigger time of the workflow, keeping in mind the following rules:

  • If the triggering time is before the current time, the workflow will be triggered immediately, and the triggering time will be passed into the time parameters for calculation.

  • The workflow only allows one instance to run at any one time. If the pre-run instance conflicts with a running instance, it will be executed in sequence.

parameters

Required

List<Map<key,value>>

The global parameters that are configured for the workflow to dynamically adapt to the environment changes (in the format of key-value). For more information, see Setting Parameters for a Workflow or SHELL-type of Task>>.

Error Code

Code

Message

Description

62104

This workflow has no task. You cannot trigger it.

The workflow does not have any task for you to trigger.

62109

Internal server exception

Internal server exception.

For other error codes, see Common Error Codes.

Samples

Request Sample

url: https://{apigw-address}/batch-processing-service/v2.1/ flows?action=updateAndTrigger&userId=yourUserId&orgId=yourOrgId
method: POST
{
    "flowId":3377,
    "triggerTime":1574385824000,
  "parameters":[{"key":"REPLACE","value":"ddee"}]
}

Return Sample

{
  "code": 0,
  "msg": "OK",
  "data": {
    "flowInstanceId": "1001-20230101000000"
  }
}