Stop action

The Stop action in the Task Bot package enables you to stop the running bot.

Settings

For example, use the Stop action to terminate the bot if a condition is met, such as if the bot encounters a file larger than 100 MB.

Using Stop action

Behavior of Stop action with using error handling in your task.

Scenario Automation structure Execution result
Scenario 1
Stop
Try
  Message Box 1
Catch
  Message Box 2
Finally
  Message Box 3
In this scenario, the Stop action was executed before the Try action started. As a result, the execution was halted, and the Finally action was not executed.
  • Message Box 1: Not printed
  • Message Box 2: Not printed
  • Message Box 3: Not printed
Scenario 2
Try
  Message Box 1
  Stop
Catch
  Message Box 2
Finally
  Message Box 3
Message Box 4
In this scenario, as the execution entered the Try action, it proceeded to the Finally action. However, the Stop action placed within the Try action terminated the execution without moving on to the next action, which is Message Box 4.
  • Message Box 1: Printed
  • Message Box 2: Not printed
  • Message Box 3: Printed
  • Message Box 4: Not printed
Scenario 3
Try
  Message Box 1
  (Some exception occurs)
  Stop
Catch
  Message Box 2
Finally
  Message Box 3
Message Box 4
In this scenario, the Stop action was placed within the Try action. When an exception occurred during the execution of the Try action, the Stop action was skipped and control was passed to the Catch action. As a result, the Stop action was not executed, and the automation continued running without termination.
  • Message Box 1: Printed
  • Message Box 2: Printed
  • Message Box 3: Printed
  • Message Box 4: Printed
Scenario 4
Try
  Message Box 1
  (Some exception occurs)
Catch
  Message Box 2
  Stop
Finally
  Message Box 3
Message Box 4

In this scenario, an action within the Try action experienced an error, causing the execution to transition to the Catch action, where an error or exception message was displayed. Afterward, the Finally action was executed.

In this case, since the Stop action was placed within the Catch action, the automation execution terminated after the Finally action, preventing the next action Message 4 from executing.

  • Message Box 1: Printed
  • Message Box 2: Printed
  • Message Box 3: Printed
  • Message Box 4: Not printed
Scenario 5
Try
  Message Box 1
  (Some exception occurs)
Catch
  Message Box 2
Finally
  Stop
  Message Box 3
Message Box 4

In this scenario, an action within the Try action experienced an error, causing the execution to transition to the Catch action, where an error or exception message was displayed. Afterward, the Finally action was executed.

In this case, since the Stop action was placed within the Finally action, the automation execution terminated after the Finally action, preventing the next set of actions from executing.

  • Message Box 1: Printed
  • Message Box 2: Printed
  • Message Box 3: Not printed
  • Message Box 4: Not printed