Skip to main content

Stop

Stops the execution of the flow.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

if ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.

Options

  • Status - Specifies the status value of the output of the node. Possible values are Success and Failed.
  • Reason - The reason message to be sent if the status is Failed.

How It Works

The Stop node terminates flow execution with a specified status:

  1. The node processes any delay before execution
  2. If Status is set to "Failed":
    • Extracts the reason message (if provided)
    • Creates an error object with type "Core.Robomotion.Stop"
    • Includes the node's GUID and name as the error source
  3. Logs the termination reason:
    • Success: "Flow completed successfully"
    • Failed: "Flow stopped by failure ({{reason}})"
  4. For Application Robots: Sends instance stop signal to the platform
  5. Stops the robot execution (calls runtime.Stop)
  6. Emits stop event to the server with status and reason
  7. Updates logging status to "Stopped"

Requirements

  • Status must be selected (Success or Failed)
  • Reason should be provided when Status is Failed (optional but recommended)

Error Handling

Error CodeDescriptionSolution
Core.Flow.Stop.ErrOnCreateFailed to parse node configurationVerify node configuration is valid JSON
Core.Flow.Stop.OnMessageMessage parsing failed during executionCheck that input message format is valid

Note: The Stop node itself terminates execution, so errors after the stop signal are not processed.

Usage Examples

Example 1: Successful Completion

End a workflow with success status:

[Complete All Tasks]

[Log: "All processing complete"]

[Stop]
Status: Success

Result: Flow stops with success status

Example 2: Error Condition Exit

Stop execution when a critical error occurs:

[Check Data Validity]

[If invalid data detected]

[Stop]
Status: Failed
Reason: "Input data validation failed - missing required field 'customerID'"

Result: Flow stops with error status and detailed reason

Example 3: Business Rule Violation

Stop when business rules prevent continuation:

[Check Account Balance]

[If balance < minimum required]

[Stop]
Status: Failed
Reason: `Insufficient balance: ${balance}. Minimum required: ${minBalance}`

Result: Flow stops with contextual error message

Usage Notes

  • When Continue On Error is enabled, errors are not caught even if a Catch node is present
  • The Stop node immediately terminates the entire flow execution
  • No nodes after Stop will execute
  • For Application Robots, a stop signal is sent to the Robomotion platform
  • The Reason field supports variable interpolation for dynamic messages
  • Stop with Success is useful for early exit conditions that aren't errors
  • The stop event is emitted before the actual robot stops to ensure server receives the signal
  • Execution order is critical: robot stops first, then server notification is sent

Tips

  • Always provide a clear, descriptive Reason when using Status: Failed
  • Use Success status for intentional early exits (e.g., "No data to process")
  • Include contextual information in the Reason (variable values, current state)
  • Use template strings in Reason for dynamic error messages: Failed at step ${stepName}
  • Stop with Success when conditions don't warrant further processing
  • Consider logging before Stop to capture additional context
  • For debugging, include the approximate location in the workflow in the Reason
  • Use Stop instead of letting errors propagate when you want controlled termination
  • Test both Success and Failed paths to ensure proper cleanup
  • In production, avoid generic messages - be specific about why the flow stopped
  • Should Stop - For checking if flow should stop (non-terminating)
  • Log - For logging before termination
  • Catch - For handling errors (note: Stop bypasses Catch when Continue On Error is true)