4.2.4 Repeated execution plug-in
Function
This plug-in enables repeated execution of a flow. You can execute a service with a value specified in the Input Properties (inputProperties) for each iteration of the flow. This is useful, for example, when you want to execute the same processing on different servers. The maximum number of nested levels that can be specified for a repeated execution plug-in is three.
Note that the execution methods for a flow include concurrent execution that executes flows in parallel, and sequential execution that executes the next flow when the current flow has finished executing.
Cautionary notes
-
When the execution of a task is stopped, the repeated flow being executed stops as soon as the plug-in finishes. In the case of a user-response wait plug-in, the flow stops without waiting for the plug-in to finish. Because unexecuted parts of the repeated flow are not executed, false is stored in the outputResult property.
-
When you forcibly terminate a task while a plug-in is running, the processing being executed is immediately forcibly terminated and the task enters the Failed status. A return code of 80 appears for the step in the Flow area of the Tasks window. The return code output to the task log depends on the timing with which the task was forcibly terminated.
-
If a repeated execution plug-in for which parallel is specified for the foreachMode property exists in a higher level, the values of the properties (service properties, output properties of plug-ins, and variables) referenced or updated in the context of a repeated task is only valid for the same repeated task (the nth flow). The values of the properties (service properties, output properties of plug-ins, and variables) cannot be shared with concurrently processed repeated tasks (except for the nth flow).
The value of the property cannot be shared with repeated tasks in lower levels. The following figure shows whether plug-ins in each level can refer to an output property updated by plug-in Z.
-
The maximum number of flows that can be specified under repeated execution plug-ins is 10,000 per service. Set the inputProperties property of each repeated execution plug-in so that the total number of flows under repeated plug-ins does not exceed 10,000. Note that the number of flows does not include the number of flows executed in the top-level flow or the flows of flow plug-ins.
For example, as shown in the diagram below, the inputProperties properties of the repeated execution plug-ins are set to repeat plug-in N twice, plug-in M twice, and plug-in Z ten times. Thus, the total number of the flows is calculated as follows: N + N * M + Z (2 + 2 * 2 + 10) = 16.
-
A nested repeated execution plug-in might cause your browser response to slow down or cause a dialog box to appear indicating that your browser is not responding. In this case, decrease the value set for the inputProperties property of each repeated execution plug-in, and then try debugging again.
-
When you use the Retry the Task From the Failed Step command with a repeated execution plug-in, processing restarts from the first step under the repeated execution plug-in. You cannot retry the task if the status of the step is Failed and the Completed status was set as a condition in the Subsequent-step Execution Condition area of the Create Step dialog box when the step was created.
-
When you use the Retry the Task From the Step After the Failed Step command with a repeated execution plug-in, JP1/AO executes the next step in the plug-in. In this case, the step enters the Completed status. The status of the steps under the repeated execution plug-in are they will be as below.
-
In the case where the repeated execution plug-in exist under flow plug-in or step using a service component
The Completed status remain unchanged. Failed or Unexecuted steps enter the Waiting status once, and after flow plug-in or step using a service component execution is completed, they enter Unexecuted status.
-
For conditions other than the above
The Completed status remain unchanged. Failed or Unexecuted steps enter the Waiting status, and even after task execution is completed, they remain Waiting status.
-
Version
01.00.01
Tag
Control Flow
Return codes
Return code |
Description |
---|---|
0 |
Ended normally. |
1 |
Some of the repeated processing failed. |
2 |
All of the repeated processing failed. |
3 |
The total number of flows under repeated execution plug-ins in the service has exceeded the upper limit. |
65 |
The connection with the JP1/AO server failed. For example, the JP1/AO server might have stopped while the plug-in was executing. |
66 |
The following user is mapped to the JP1 user:
|
68 |
There is no information about the target job execution ID. |
69 |
An environment variable of the task-processing engine could not be acquired. |
80 |
Task execution has stopped. |
81 |
The plug-in was called in an invalid status. |
82 |
The request message from the task-processing engine could not be correctly parsed. |
83 |
The environment of the JP1/AO server is corrupted. |
84 |
Information about the specified plug-in could not be obtained. |
86 |
The specified property value is invalid. |
127 |
Another error has occurred. |
Property list
The following table describes the properties.
Property key |
Property name |
Description |
Default value |
I/O type |
Required |
---|---|---|---|---|---|
inputProperties #1 |
Input Properties |
Specify an input property value for each repetition of the flow, using no more than 1,024 characters. You can specify a different property for each repetition. Use a comma to separate properties. Commas can only be used as delimiting characters. The maximum number of repetitions is 99. You cannot specify 100 or more comma-separated values. |
-- |
Input |
R |
outputProperties #2 |
Output Properties |
Outputs the value of the output property for the number of repetitions. The total output is 1,024 characters or less. At each repetition, one property value is output separated by a comma in the order specified in the inputProperties property. Use a comma as the delimiting character. |
-- |
Output |
O |
outputResult |
Results |
The execution result of each flow is output, separated by commas.
|
-- |
Output |
O |
foreachMode |
Mode |
Specify the execution method for the repeated flow.
|
parallel |
Input |
R |
- #1
-
The values specified in the inputProperties property are stored in the reserved.loop.input reserved property used in repeated flows. A different value is stored in the reserved.loop.input property and the reserved.loop.index property for each iteration of the repeated flow. Because a different value is stored in the reserved.loop.input property and the reserved.loop.index reserved property for each iteration of the repeated flow, specify the property in the ?dna_reserved.loop.input?, ?dna_reserved.loop.input? format.
- #2
-
The outputProperties property stores the value of the reserved.loop.output reserved property used in the repeated flow.
Related topics
-
User-specified properties file (config_user.properties) in the JP1/Automatic Operation Configuration Guide
-
List of reserved properties in the JP1/Automatic Operation Service Template Development Guide