Starting automation
The Automation tab defines the sequence of actions performed after calling the endpoint configured in the Execute automation mode. The automation defined here will always be started without the context of the element, so all actions performed as part of the automation or other sub-automations cannot refer to the value of a specific workflow element. In automation, however, you can register a new element using the action Start workflow or Start workflow (SQL), update the element by indicating its ID in the action Update related workflow instance, perform a path transition in the indicated elements using the action Move workflow (SQL). The full list of actions available in this context is included in the chapter Actions.
Passing external data to automation
External data is passed to automation using input parameters. These parameters, initialized with external data, can be freely used within the automation and in individual actions.
To initialize automation input parameters and give them appropriate values, they must be passed in the request body in JSON format. The names of the nodes must correspond to the names of the defined input parameters of the automation, e.g.:
{
"Param1": "sample value",
"Param2": 1
}
Data can also be passed in a query string. In this case, the parameter names must correspond to the names of the input parameters defined in the automation., e.g.:
https://webconbps.com/api/udef/db/1/MyEndpoint?Param1=sample%20value&Param2=1
If the parameters were passed both in the request body and in the query string, then the parameters from the query string are ignored.
The result of the call is returned in JSON format. The output data, corresponding to the output parameters of the automation, is placed in the Data node, e.g.
{
"Data":
{
"Output1": "sample return value",
"Output2": 23
}
}
Error handling
In the event of an error during automation execution, the Error handling automation is launched by default, and then a response containing the error code and any message is returned. Errors resulting from business logic (e.g. failed data validation) return HTTP error code 409. Errors resulting from incorrect configuration return HTTP error code 400.
If an Break with error block is used in the automation sequence, and an error code in the range 400-409 is defined, an error with that code is returned. If a code outside of this range is specified, HTTP error 409 is returned.