Checks if somebody stopped a running job using the Stop option in UiPath Orchestrator. This activity assures a smooth termination of a job since it prevents the sudden interruption of an ongoing process. It also allows the user to configure the workflow such that it performs various routines after the stop is triggered. You can, for example, perform a "clean up" routine to close windows and applications which have been targeted within the workflow.
The Robot needs to be connected to Orchestrator for the
UiPath.Core.Activities.ShouldStopactivity to work as it is triggered by the Stop command sent from Orchestrator.
- Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
- Result - The result of the activity, as a boolean variable. Its value is determined by the status of the Orchestrator job, as follows:
- True - The job was stopped.
- False - The job was not stopped.
- DisplayName - The display name of the activity.
A practical use of the Should Stop activity is to inform you about the status of a job. To better understand, let's assume we have a workflow which extracts items from a queue and uses the Write Range activity to insert them in an Excel file. The Should Stop activity can be added after the Write Range activity. This would mean that even if the job is stopped in Orchestrator, currently processed information is still written to the Excel file. You can use the Result of the Should Stop activity as a condition for an If activity, as follows:
- Then - Use a Message Box or Send Mail Message activity to inform users that the job was stopped in Orchestrator if the value of the Result property is True.
- Else - Leave this field blank so that the workflow continues normally if the value of the Result property is False.
Updated about a year ago