Top
Systemwalker Runbook Automation Studio User's Guide
Systemwalker

6.19.2 Sequential Loop

In the Sequential Loop node, node instances are generated sequentially till a certain condition is satisfied. The Activity Node, Subprocess Node, and Compound Activity Node can be defined as the Sequential Loop node.

The following is a description of how to define the Sequential Loop node.

  1. Select the node you want to define as the Sequential Loop node.

  2. On the General tab in the Properties view, select Sequential Loop under Looping.

  3. Settings for the repeating condition and the maximum number of repetitions for generating node instances can be performed as follows.

    • To specify settings for the repeating condition, select the Condition check box and type a JavaScript expression for the condition. It is also possible to create an expression by using the Expression Builder dialog box to specify it directly into the field. Node instances will be generated for as long as the specified repeated condition remains true (valid).

      Note

      The condition is assessed prior to generation of the node instance. If the condition is false from the very first time it is assessed, no node instances are generated.

    • To specify settings for the maximum number of repetitions, select the Number of Iterations check box and either type a value in the field or select an INTEGER-type UDA from the drop-down list. The integer value of the specified value or the selected UDA is deemed to be the number of node instances generated. Either addition or subtraction can be selected for the maximum number of repetitions counter.

      • If the Increment counter is selected, the repetitions counter begins at 1 and increases till the value specified for the maximum number of repetitions is reached. The loop ends when the maximum number of repetitions for the repetitions counter is reached.

      • If the Decrement counter is selected, the repetitions counter begins at the value specified for the maximum number of repetitions and decreases till it reaches 1. The loop ends when the repetitions counter reaches 1.

    Note

    • It is possible to specify either the repeating condition or the count for the maximum number of repetitions, or both. If specifying both, the loop will end when one of the conditions is reached.

    • If neither is specified, it will not be possible to define the selected node as a Sequential Loop node.

  4. Select exception handling from the drop-down list while the node instances are being repeatedly executed.

    • None: Exceptions are processed in accordance with the settings for handling node exceptions. For further information, see "Operating options for exception handling" covered later in this chapter.

    • Ignore and continue the loop: Ignore errors and continue the loop.

    • Break the loop: End the loop.

In the example below, both Conditions and Number of Iterations are defined for the Sequential Loop.

Figure 6.25 Sequential Loop definition

Note

  • Only 1 (outward-facing) arrow can be drawn from the Sequential Loop node.

  • It is not possible to specify settings for a due date and/or timer in the Activity Node that defined the Sequential Loop node.

Select None under Looping to disable the Sequential Loop node.

The Sequential Loop node is represented by a round arrow. Below is a representation of an Activity Node, Subprocess Node, and Compound Activity Node when defined as a Sequential Loop node.

Figure 6.26 Activity Node

Figure 6.27 Subprocess Node

Figure 6.28 Compound Activity Node

Operating options for exception handling

The table below indicates the status of loop operations, process instances, and loop node instances when executing the specified exception processes using an Activity Node as the Sequential Loop node.

Process where the error occurred

Specified exception process

Loop operation

State of loop node instance

State of process instance

Beginning action (Role action agent)

Process exceptions based on the program

Stopped in the loop node instance where the error occurred.

Error

Error

Ignore error, and continue loop

Continue loop in accordance with the settings for the loop condition and upper limit value of the loop count

Finished

Running

End the loop

End the loop, and activate the next node

Interrupted

Running

Finishing action

Process exceptions based on the program

Failure of selected operations

Running

Running

Ignore error, and continue loop

Continue loop in accordance with the settings for the loop condition and upper limit value of the loop count

Finished

Running

End the loop

End the loop, and activate the next node

Interrupted

Running

The table below indicates the status of loop operations, process instances, and loop node instances when executing the specified exception processes using a Subprocess Node as the Sequential Loop node.

Process where the error occurred

Specified exception process

Loop operation

State of loop node instance

State of parent process

State of child process

Starting action

Process exceptions based on the program

Stopped in the loop node instance where the error occurred.

Error

Error

Not created

Ignore error, and continue loop

Continue loop in accordance with the settings for the loop condition and upper limit value of the loop count

Finished

Running

Not created

End the loop

End the loop, and activate the next node

Interrupted

Running

Not created

Finishing action

Process exceptions based on the program

Stopped in the loop node instance where the error occurred.

Paused

Error

Paused

Ignore error, and continue loop

Continue loop in accordance with the settings for the loop condition and upper limit value of the loop count

Finished

Running

Finished

End the loop

End the loop, and activate the next node

Interrupted

Running

Finished

The table below indicates the status of loop operations, process instances, and loop node instances when executing the specified exception processes using a Compound Activity Node as the Sequential Loop node.

Process where the error occurred

Specified exception process

Loop operation

State of loop node instance

State of process instance

Beginning action (Role action)

Process exceptions based on the program

Stopped in the loop node instance where the error occurred; the instance of the Compound Activity node's child node remains as is

Error

Error

Ignore error, and continue loop

Continue loop in accordance with the settings for the loop condition and upper limit value of the loop count; the instance of the Compound Activity node's child node remains as is

Finished

Running

End the loop

End the loop, and activate the next node; the Compound Activity node's child node instance remains as is

Interrupted

Running

Finishing action

Process exceptions based on the program

If the Compound Activity node finishes normally after all the child node instances are complete, the loop stops at its designated loop node instance and the Compound Activity node and its valid child node is paused

Paused

Error

An error occurs when the Compound Activity node work item is selected

Standing by at the subprocess

Running

Ignore error, and continue loop

Continue loop in accordance with the settings for the loop condition and upper limit value of the loop count; the state of the child node instance will be as indicated below:

  • If the Compound Activity Node finishes normally after all the child node instances are complete, the state of the child node instance remains the same

  • When the Compound Activity Node work item is selected, the valid child node instance will be in the "finished" state; the state of other child node instances remains the same

Finished

Running

End the loop

Ends the loop and activates the next node; the state of the child node instance will be as indicated below:

  • If the Compound Activity Node finishes normally after all child node instances are complete, the state of the child node instance remains the same

  • When the Compound Activity Node work item is selected, the valid child node instance will be in the "finished" state; the state of other child node instances remains the same

Interrupted

Running