Skip to main content

End Workflow

Command Description​

Ends the current workflow immediately, returns optional output values, and resumes execution in the calling workflow.

Command Input Parameters​

Dynamic input parameter rules:

  • Use get_target_tab_flow to retrieve the current workflow's output parameters. They become this command's input parameters.
  • Each key in JSON in must exactly match an output parameter name in the current workflow.
  • Values in JSON in are Python expressions. Write string literals with nested Python quotes, such as "ProductPrice": "'CNY 1.0'"; write variable references directly, such as "ProductElement": "web_element".
  • If the workflow has no output parameters, omit in.

Command Output Parameters​

None.

Example 1​

Current workflow input parameters:

Parameter NameType
webPageWebPage
ProductNamestr

Current workflow output parameters:

Parameter NameType
ProductPricestr
ProductElementWebElement

The following workflow returns a string literal and a web element:

[
{
"ins": "Get Web Element",
"in": {
"Webpage Object": "webPage",
"Web Element": "'4c47c360-bf18-478a-9e45-2e60bf469317'",
"Element Wait Duration": "30"
},
"out": {
"Web Element": "web_element"
}
},
{
"ins": "End Workflow",
"in": {
"ProductPrice": "'CNY 1.0'",
"ProductElement": "web_element"
}
}
]

Example 2​

  • The subworkflow obtains the number of rows in the specified spreadsheet.

  • The current workflow waits until the subworkflow returns or finishes. In this example, the Example workflow executes line 4 before the Main workflow proceeds to line 2.

  • The calling workflow uses the returned result.