Generate a Business Error with the Stop Automation in Error control
The Stop Automation in Error control allows you to raise a business error that generates a customized input message in the logs, when your automation is failing.
In this procedure, you will create a workflow with a condition and raise a business error that will give a different result for your automation. With a business error, you can decide if you want to execute the activity on the condition branch or stop your automation.
Prerequisite
You have created an automation Throw business error.
Procedure
-
In the Input/Output section, on the right-hand side panel, define the input parameter number of type number.
-
Drag and drop the Condition control in the workflow.
Enter the following condition Step0.number > 10 && Step0.number < 0

With this condition, if the input number entered at the testing phase is between 0 and 10, the automation goes onto the main branch.
-
Drag and drop the Stop automation in error control on the default branch of the condition.
By dragging this control on the default branch, the automation will end in an error, if the condition set in the second step of the procedure is not met.
-
Select the Stop automation in error control.
On the General Data side panel, the control awaits an Error message as input. This error message is the business error that you will raise with the Stop automation in error control. At execution time, this business error will be displayed on the Tester Data side panel and in the logs.
-
Enter an error message.

-
-
Add a Log Message activity on the condition branch with the input message Valid number.
-
Test your automation.
-
Select your environment.
-
In the required input parameters, add a number higher than 10 and click Test.

-
Results
Your automation fails with the Stop automation in error control. The error raised by the Stop automation in error is displayed as a BusinessError on the tester timeline and the error message previously set in the automation is displayed in the logs.
