Skip to content

Shell Activity

The Shell activity enables the execution of shell scripts and system commands within a workflow. It provides comprehensive control over command arguments, environment variables, and execution flow management to integrate external processes.

Field Description Requirement
Command The specific shell command or script to be executed. Required
Argument 1 The first argument passed to the shell command. Optional
Argument 2 The second argument passed to the shell command. Optional
Argument 3 The third argument passed to the shell command. Optional
Argument 4 The fourth argument passed to the shell command. Optional
Argument 5 The fifth argument passed to the shell command. Optional
Wait Determines if the activity waits for the shell process to terminate before proceeding. Optional
Output Variables The variable designated to store the standard output of the shell command. Optional
Error Code Variable The variable designated to store the exit or error code of the shell command. Optional
Redirect Error Specifies if the standard error should be merged into the standard output stream. Optional
Clean Env Specifies whether the shell process inherits the current environment variables. Optional
Directory Defines the default working directory for the shell process. Optional
Exclusive Ensures that jobs are executed in a specific order when receiving tasks from specific processes. Optional
Execution listeners Configures listeners for activity, process, sequence flow, or event lifecycle stages. Optional
Multi-instance type Defines whether and how multiple instances of this activity are generated. Optional
Cardinality (Multi-instance) A numeric value or expression that sets the number of instances to create. Optional
Collection (Multi-instance) A collection of elements that determines the number of instances created. Optional
Element Variable (Multi-instance) The variable name assigned to the current element within a multi-instance loop. Optional
Completion Condition (Multi-instance) An expression that terminates the creation of new instances when evaluated as true. Optional
Is for compensation A flag indicating if the activity is used for compensation logic. Optional

Action Types & Examples

Execution Listeners

  • Format: string
  • Example Result: "Start"

Multi-instance Type

  • Format: string
  • Example Result: "Parallel"

Completion Condition

  • Format: boolean expression
  • Example Result: "${variable==True}"

Implementation Examples

Field Setup - Command: "sh" - Argument 1: "backup_script.sh" - Directory: "/home/user/scripts" - Output Variables: "cmdOutput"

Execution Parameters - Multi-instance type: "Sequential" - Cardinality (Multi-instance): "2" - Element Variable (Multi-instance): "elementvar" - Execution listeners: "End"

Technical Notes

The Shell activity is designed for high-performance script execution. When utilizing Multi-instance types, ensure that the Cardinality or Collection parameters are correctly defined to prevent execution errors. Standard error redirection is recommended for debugging complex shell scripts to ensure all diagnostic data is captured in the output variable.