1 Context:
This step entails using a workflow from client-logic. using the click event of a button we will trigger the workflow on the server.Â
2 Step by step guide:
- re-use the logic-workflow you created in the previous task, or create a new one.
- open the order- Form in Designer that you created in the previous steps.
- Use âLibrary of Objectsâ to add a âSimpleSwatButtonâ and set enable = true, label = âcall workflowâ
- edit the EventClick event of the Button and insert the following code. use any value for the âpayloadâ part.
âŁ
b1.v1.App.invokeServerTask({
methodName: "myFirstWorkflow",
methodType: "automation",
paramObj: {
payload: { launches: "latest"}
},
})
- Add the Form to your OrderOverView Screen wherever you like (e.g. add another Page, or change the Layout,âŚ)
Check the Result
- Launch the screen and click on the button.
- Navigate to your Automation-Flow and switch from âDesignâ to âExecuteâ
You see all executions of your workflow. click on an execution, to see the flow of data through the nodes.
Trouble shooting
Use the Network Tab of the Browser to check if your Automation-Flow is called correctly or if there are errors. Possible problems to check:
- Did you set your Automation-Flow to âactiveâ ?
- Did you set the Webhook Node to âPOSTâ ?
- Is the Path in your webhook node correct and matches with your button-code (it is case-sensitive!) ?
3 Explanation:
With this workflow example, we show how easy it is to connect an external API using visual tools. This task includes three components: