ScriptEigener Objekttyp in der Automation Engine function: Modifies active workflows.
General information
Workflow"Ermöglicht das Hinzufügen, Anordnen, Verknüpfen, Definition von Eigenschaften und Entfernen von Aufgaben eines Workflows. Ein eigener Objekttyp in der Automation Engine. [Früher ""AblaufPlan"" und ""JobPlan"" gennant.]" modifications are made in several steps using MODIFY_TASK:
The parameters of this script function must be listed in a particular order. Commas are required even if individual parameters are omitted (see examples below).
Use START or END in order to modify properties in the START or END box.
Note that as of version 9.00A, the Result tab (workflow properties) no longer exists. It cannot be changed anymore by using the script function MODIFY_TASK.
You cannot use this script element in order to stop or continue the execution of its own workflow and then end it.
Return codes |
---|
General: "0" - The modification was successful. ADD_TASK: Running number of the added workflow task. REPLACE_TASK or CLONE_AND_REPLACE: Running number of the new workflow task. |
[Start, Stop and Commit] [Modifying workflow structures] [General tab] [Earliest tab] [Dependencies tab] [Runtime tab] [External Dependency tab][Value tab]
Syntax
MODIFY_TASK (RunID, [task name], [running number], REPLACE_TASK, object name, [EXTERNAL, workflow name])
MODIFY_TASK (RunID, [task name], [running number], CLONE_AND_REPLACE, object name, [EXTERNAL, workflow name])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated workflow. |
Task name
running number |
Name or running number of the workflow task that should be replaced. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
REPLACE_TASK or CLONE_AND_REPLACE |
Name of the task to replace. The difference between the two is that REPLACE_TASK sets the old task to inactive, whereas CLONE_AND_REPLACE does not. |
Object name | Name of the object that should replace the task. Format: script literal or script variable |
EXTERNAL | Replaces an external dependency. |
workflow name | Name of the workflow to which the external dependency refers. Format: script literal or script variable |
Comments
This script function replaces a workflow task by another object.
An external dependency can only be replaced by an external dependency and a regular workflow task can only be replaced by a regular workflow task.
Example
The external dependency MM.GET.FILES is replaced by the external dependency MM.FILE.INPUT.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "MM.GET.FILES",, REPLACE_TASK, "MM.FILE.INPUT", EXTERNAL)
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
[Start, Stop and Commit] [Modifying workflow structures] [General tab] [Earliest tab] [Dependencies tab] [Runtime tab] [External Dependency tab][Value tab]
Syntax
MODIFY_TASK (RunID, object name,, ADD_TASK [EXTERNAL, workflow name])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated workflow. |
Object name |
Name of the object that should be inserted in the workflow. |
ADD_TASK | Adds a task. |
EXTERNAL | Adds a task as an external dependency. |
workflow name | Name of the workflow to which the external dependency should refer. Format: script literal or script variable |
Comments
This script function adds a task or an external dependency to a workflow.
A task is positioned in an empty spot within a workflow. Use MODIFY_TASK in combination with MOVE_TASK to move it.
Attention: The added task is not automatically linked with other tasks. Draw the required lines by using MODIFY_TASK together with ADD_DEPENDENCY.
Attention: Two commas must be set after the parameter Object name. This third parameter is the running number of a task within the workflow. It is irrelevant if you add a task.
Tasks that are added in the monitor may get the workflow's AE priority passed on, if the option is active in the workflow.
Example
The object FILE.INPUT is added to the workflow MM.DAY.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#,"FILE.INPUT",, ADD_TASK)
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK (RunID, [task name], [running number], REPLACE_TASK, object name, [EXTERNAL, workflow name])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated workflow. |
Task name
running number |
Name or running number of the workflow task that should be replaced. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
REPLACE_TASK | Replaces a task. |
Object name | Name of the object that should replace the task. Format: script literal or script variable |
EXTERNAL | Replaces an external dependency. |
workflow name | Name of the workflow to which the external dependency refers. Format: script literal or script variable |
Comments
This script function replaces a workflow task by another object.
An external dependency can only be replaced by an external dependency and a regular workflow task can only be replaced by a regular workflow task.
Example
The external dependency MM.GET.FILES is replaced by the external dependency MM.FILE.INPUT.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "MM.GET.FILES",, REPLACE_TASK, "MM.FILE.INPUT", EXTERNAL)
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK(RunID, [Task name], [running number], MOVE_TASK ,Column, Line)
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated workflow. |
Task name
running number |
Name or running number of the workflow task that should be moved. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
MOVE_TASK | Moves a task. |
Column | Number of the column to which the task should be moved. Format: script literal, number or script variable |
Line | Number of the line to which the task should be moved. Format: script literal, number or script variable |
Comments
This script function moves a workflow task.
Example
The task FILE.INPUT is moved to the fourth line of the first column.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, MOVE_TASK, 1, 4)
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK(RunID, [Task name], [running number], ALIAS, Alias)
MODIFY_TASK(RunID, [Task name], [running number], ALIAS_PARENT , Alias ParentEin Objekt kann auf verschiedenste Arten aktiviert werden. Der Verursacher der Aktivierung wird als übergeordnete Aufgabe (Parent) bezeichnet. (siehe auch Child, Children))
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated workflow. |
Task name
running number |
Object name or running number of the workflow task that should be moved. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. The system automatically uses the task that has the lowest number if there are several tasks of the same name in the workflow and no running number is specified. |
ALIAS | Modifies the alias name of a task or an external dependency in the workflow. |
ALIAS_PARENT | Modifies the alias name of the workflow of an external dependency. Can only be used if the external task derives from a different workflow. |
Alias Alias Parent |
Number of the column to which the task should be moved. Format: script literal, number or script variable Alias name for the task, the external dependency or for the workflow of the external task (only for external dependencies that refer to a task in a different workflow). The same limitations apply for alias names and for object names: |
Comments
This script function modifies the alias name of a task or external dependency in a workflow.
You can only change the alias name of workflow tasks and external dependencies that have been added using this script element. Use the parameter ADD_TASK for this purpose.
Automic recommends indicating the running number in order to ensure that the modifications are made in the correct task. This is especially useful if the workflow includes several tasks of the same object name. The running number is this script function's code that is returned if you add a task (ADD_TASK).
Example
The task FILE.INPUT is added to the workflow MM.DAY and its alias name is changed to ALIAS.FT.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &NR# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, ADD_TASK)
:SET &RET# = MODIFY_TASK(&RUNID#, "FILE.INPUT",&NR#,ALIAS,ALIAS.FT)
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
[Start, Stop and Commit] [Modifying workflow structures] [General tab] [Earliest tab] [Dependencies tab] [Runtime tab] [External Dependency tab][Value tab]
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], CHECKPOINT, Time stamp, [Time zone], [Alarm object])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
CHECKPOINT | Sets or removes a checkpoint. |
Time stamp |
Time stamp for the checkpoint. Allowed values: Time stamp in the format TT/HH:MM - Sets a checkpoint using this time stamp. |
Time zone |
Name of a TimeZone object. TimeZone to which the time stamp should be converted. |
Alarm object | Object that should start if the checkpoint has been exceeded. Format: script literal or script variable |
Comments
This script function adds a checkpoint to a workflow task or removes it.
Example
The task FILE.INPUT which is part of the workflow MM.DAY obtains a checkpoint. The Notification object DAYSHIFT should start if the checkpoint has been exceeded.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, CHECKPOINT, "00/15:00",,"DAYSHIFT")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
[Start, Stop and Commit] [Modifying workflow structures] [General tab] [Earliest tab] [Dependencies tab] [Runtime tab] [External Dependency tab][Value tab]
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], EARLIEST_START, Time stamp, [Time zone])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
EARLIEST_START | Sets or removes an earliest starting time. |
Time stamp |
Time stamp for the earliest starting time. The comparison value for the earliest start time is the real date (= the generation time of the top workflow). Allowed values: Time stamp in the format TT/HH:MM - Sets an earliest starting time with this time stamp. |
Time zone |
Name of a TimeZone object. TimeZone to which the time stamp should be converted. |
Comments
This script function adds an earliest starting time to a workflow task or removes it.
Example
The task "FILE.INPUT" of the workflow "MM.DAY" obtains an earliest starting time.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, EARLIEST_START, "00/18:00")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK (RunID, [Task name], [Running number], ACTIVE, Value)
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
ACTIVE |
Sets a workflow task to active or inactive. |
Value |
Allowed values: YES and NO "YES" - Sets the workflow task to active. Processing starts at its starting time. |
Comments
This script function sets a workflow task to active or inactive.
Example
The task FILE.INPUT of the workflow MM.DAY is set to inactive.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, ACTIVE, "NO")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK (RunID, [Task name], [Running number], BREAKPOINT, Value)
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
BREAKPOINT | Sets a breakpoint for a workflow task or removes it. |
Value |
Allowed values: YES and NO "YES" - Sets a breakpoint for the workflow task. |
Comments
This script function sets a breakpoint for a workflow task or removes it.
Example
A breakpoint is set for the task FILE.INPUT of the workflow MM.DAY.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, BREAKPOINT, "YES")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
[Start, Stop and Commit] [Modifying workflow structures] [General tab] [Earliest tab] [Dependencies tab] [Runtime tab] [External Dependency tab][Value tab]
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], LATEST_START,Time stamp, [Time zone])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
LATEST_START | Sets a latest start time or removes it. |
Time stamp |
Time stamp for the latest starting time. Allowed values: Time stamp in the format TT/HH:MM - Sets a latest starting point using this time stamp. |
Time zone |
Name of a TimeZone object. Time zone to which the time stamp should be converted. |
Comments
This script function adds a latest starting point to a workflow task or removes it.
Example
The task FILE.INPUT of the workflow MM.DAY obtains a latest starting point.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, LATEST_START, "00/10:00")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], LATEST_END,Time stamp, [Time zone])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
LATEST_END | Sets a latest ending time or removes it. |
Time stamp |
Time stamp for the latest ending time. Allowed values: Time stamp in the format TT/HH:MM - Sets a latest ending time using this time stamp. |
Time zone |
Name of a TimeZone object. Time zone to which the time stamp should be converted. |
Comments
This script function adds a latest ending time to a workflow task or removes it.
Example
The task FILE.INPUT of the workflow MM.DAY obtains a latest ending time.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, LATEST_END, "00/18:00")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], DEPENDENCY_STATE_MATCH,Value)
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
DEPENDENCY_STATE_MATCH | Specifies the number of predecessor states that must apply. |
Value |
Allowed values: ALL and ONE "ALL" - All states must apply. |
Comments
This script function determines the number of predecessor states that must apply in order to have the workflow task processed.
Example
All predecessors of the task FILE.INPUT of the workflow MM.DAY must show the expected status.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, DEPENDENCY_STATE_MATCH, "ALL")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK (RunID, [Successor task name], [Running number], Dependency, [Source task name], [Running number], StatusZustand einer Aufgabe (z.B. aktiv, blockiert, in Generierung, usw.).)
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated workflow. |
Successor task name Running number |
Name or running number of the successor task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
Dependency |
Action for editing dependencies. Allowed values: ADD_DEPENDENCY, MODIFY_DEPENDENCY and REMOVE_DEPENDENCY "ADD_DEPENDENCY" - Adds a dependency. |
Task name
Running number |
Name or running number of the task whose dependency should be changed. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
Status |
Status that is expected of the preceding task at the end of its execution. Allowed values: "End status" and "NONE" "End status" (for example, ENDED_OK) No status indication is required for "REMOVE_DEPENDENCY". |
Comments
This script function adds a dependency to a workflow task, modifies or removes it. It links tasks with lines.
Example
The START box is linked with the 4th task. The end status the 9th task expects of its predecessor is changed to ANY_OK. The dependency including the line linking the 10th and 11th task is removed.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#,, 4, ADD_DEPENDENCY, "START",, "ENDED_OK")
:SET &RET# = MODIFY_TASK(&RUNID#,, 9, MODIFY_DEPENDENCY,, 8,"ANY_OK")
:SET &RET# = MODIFY_TASK(&RUNID#,, 11, REMOVE_DEPENDENCY,, 10, "ENDED_OK")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], DEPENDENCY_ELSE_ACTION , Else action, [Alarm object])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
DEPENDENCY_ELSE_ACTION |
Determines the action that should be taken if the dependencies are not fulfilled as expected. |
Else action |
Allowed values: ABORT, BLOCK, BLOCK_ABORT and SKIP "ABORT" - The task and the workflow are canceled. |
Alarm object |
Object that should start if the checkpoint is exceeded. |
Comments
This script function determines the action that should take place if dependencies are not fulfilled as expected.
Example
The task FILE.INPUT of the workflow MM.DAY is skipped if the dependencies do not apply.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, DEPENDENCY_ELSE_ACTION, "SKIP")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
[Start, Stop and Commit] [Modifying workflow structures] [General tab] [Earliest tab] [Dependencies tab] [Runtime tab] [External Dependency tab][Value tab]
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], Runtime option, Value)
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
Runtime option |
Runtime option that should be changed. Allowed values: "RUNTIME_USE_TASK_SETTINGS" - The task's MRT/SRT setting should be used. |
Value |
The value depends on the particular runtime option: For "RUNTIME_USE_TASK_SETTINGS": YES and NO For "RUNTIME_MRT_NONE": No value For "RUNTIME_MRT_FIXED": Fixed value in the format HHHH:MM:SS For "RUNTIME_MRT_ERT": Percentage For "RUNTIME_MRT_TIME": TT/HH:MM [, Time zone] For "RUNTIME_SRT_NONE": No value For "RUNTIME_SRT_FIXED": Fixed value in the format HHHH:MM:SS For "RUNTIME_SRT_ERT": Percentage For "RUNTIME_ELSE_ACTION": Else action [, Alarm object] |
Comments
This script function changes a workflow task's runtime settings.
Example
The Notification object DAYSHIFT starts if executing the task FILE.INPUT takes longer than two hours. This minimum runtime is irrelevant in this case.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RETMRT# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, RUNTIME_MRT_FIXED, "2:00:00")
:SET &RETSRT# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, RUNTIME_SRT_NONE)
:SET &RETACT# = MODIFY_TASK(&RUNID#, "FILE.INPUT",, RUNTIME_ELSE_ACTION,"CANCEL", "DAYSHIFT")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
[Start, Stop and Commit] [Modifying workflow structures] [General tab] [Earliest tab] [Dependencies tab] [Runtime tab] [External Dependency tab][Value tab]
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], EXTERNAL_SATISFACTION,Lead-time satisfaction, [Duration])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
EXTERNAL_SATISFACTION | Determines the lead-time satisfaction. |
Lead-time satisfaction |
Validity of the lead-time satisfaction. Allowed values: LOGICAL_DATE, LAST_EXECUTION, BEFORE_START and AFTER_START "LOGICAL_DATE" - Only valid if activated with the same logical date. |
Duration |
Period for the option "BEFORE_START" in the format "HH:MM:SS." |
Comments
This script function determines the lead-time satisfaction of an external dependency.
Example
The lead time for the external dependency MM.GET.FILES commences when the workflow starts.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "MM.GET.FILES",, EXTERNAL_SATISFACTION, "AFTER_START")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], EXTERNAL_STATUS , Status)
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
EXTERNAL_STATUS | Sets or removes the expected status. |
Status |
Status that is expected for the external task at the end of its execution. Allowed values: "End status" and "NONE" "End status" (for example, ENDED_OK) |
Comments
This script function sets the status expected for an external dependency.
Example
The workflow MM.DAY expects the status ENDED_OK for the external dependency to MM.GET.FILES.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "MM.GET.FILES",, EXTERNAL_STATUS, "ENDED_OK")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], EXTERNAL_ELSE_ACTION, Action, [Alarm object])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
EXTERNAL_ELSE_ACTION |
Determines the action that should be taken if the external task could not fulfill the expected status at least once or did not end within the lead time. |
Action |
Allowed values: WAIT, SKIP and CANCEL "WAIT" - Waits |
Alarm object | Object that should start if a timeout occurs. Format: script literal or script variable |
Comments
This script function determines the Else action of an external dependency.
Example
The workflow MM.DAY is canceled if the external dependency referring to MM.GET.FILES does not occur as expected. In this case, the Notification object DAYSHIFT should start.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "MM.GET.FILES",, EXTERNAL_ELSE_ACTION, "CANCEL", "DAYSHIFT")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Syntax
MODIFY_TASK(RunID, [Task name], [Running number], EXTERNAL_TIMEOUT_ACTION,Timeout length, Action, [Alarm object])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
EXTERNAL_TIMEOUT_ACTION | Determines the time span to be waited for the Else action "Wait." |
Timeout length |
Timeout duration in the format HH:MM:SS. |
Action |
Allowed values: WAIT, SKIP and CANCEL. "WAIT" - Wait |
Alarm object | Object that should start if a timeout occurs. Format: script literal or script variable |
Comments
This script function determines the timeout setting of an external dependency.
Example
The external dependency that refers to MM.GET.FILES is skipped after a one-hour waiting time.
:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &RET# = MODIFY_TASK(&RUNID#, "MM.GET.FILES",, EXTERNAL_TIMEOUT_ACTION, "01:00:00", "SKIP")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
[Start, Stop and Commit] [Modifying workflow structures] [General tab] [Earliest tab] [Dependencies tab] [Runtime tab] [External Dependency tab] [Value tab]
Syntax
MODIFY_TASK(RunID, Task name, Running number, VALUE,PROMPTSET NAME || <VALUE>, VARIABLE || NEW VARIABLE, "VALUE", [SELECT || DESELECT || CLEAR || -> default SPACE])
Syntax |
Description/Format |
---|---|
RunID |
Running number (RunID) of the activated object. |
Task name
Running number |
Name or running number of the workflow task. Within a workflow, a task is identified via its name or its running number. You can specify the task name or number within the workflow. Specifying both parameters requires that the name and the number comply with each other. Attention: The running number refers to the number within the workflow and not to the task's RunID (such as "3" for the third task). The running number is recorded in the task box. |
VALUE |
Fixed parameter "VALUE" - modifies the value of a variable:
|
Promptset name or "<VALUE>" |
Name of PromptSet = name of PromptSet object "<VALUE>" = specifies an Object variable (e.g. "&myvar#") |
VariableSpeichert oder ermittelt Werte dynamisch zur Laufzeit. Auch ein eigener Objekttyp in der Automation Engine. Name | If the variable does not exist and the previous parameter is set to <VALUE>, the variable will be created. |
Value |
Value for variable (optional) Format: script literal or script variable This parameter is mandatory for arrays (when using PromptSets). |
SELECT or DESELECT or CLEAR or SPACE (default) |
This parameter is used to modify the selection of an array (PromptSet control). (optional)
To modify all non-array (PromptSet controls value, object variable value)
|
Comments
The parameter VALUE modifies the value of a variable:
Examples
Example 1: Modifies the value of the variable &VARIABLE# of workflow task SCRI.NEW.01 (SCRI)and sets it to the value "Vienna-City". If the variable &VARIABLE# does not exist, then it is created with the value "Vienna-City".
:SET &RUNID# = ACTIVATE_UC_OBJECT("JOBP.NEW.01")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &MODIFY# = MODIFY_TASK(&RUNID#, "SCRI.NEW.01", 4, VALUE, "<VALUE>", "&&VARIABLE#", "Vienna-City")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Example 2: Modifies task SCRI.NEW.01 (SCRI) of workflow by setting its PromptSet PRPT.NEW.01 (PRPT) values. Select the item "Test01" of the PromptSet control checklist "CKG#".
("CKG#" represents an array of PromptSet control items in this checklist, "Test01" is one item within this array that is selected via script)
:SET &RUNID# = ACTIVATE_UC_OBJECT("JOBP.NEW.01")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &MODIFY# = MODIFY_TASK(&RUNID#, "SCRI.NEW.01", 4, VALUE, "PRPT.NEW.01", "CKG#", "Test01", "SELECT")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
Example 3: Modifies PomptSet variable "Textfield01#" value by setting it to "mytextfieldvalue"
:SET &RUNID# = ACTIVATE_UC_OBJECT("JOBP.NEW.01")
:SET &RETSTOP# = MODIFY_TASK(&RUNID#, STOP_MODIFY)
:SET &MODIFY# = MODIFY_TASK(&RUNID#, "SCRI.NEW.01", 4, VALUE, "PRPT.NEW.01", "Textfield01#", "mytexfieldvalue")
:SET &RETCOMMIT# = MODIFY_TASK(&RUNID#, COMMIT)
:SET &RETGO# = MODIFY_TASK(&RUNID#, GO)
See also:
Script element | Description |
---|---|
MODIFY_UC_OBJECT | Modifies the attribute of an activated object. |
Script Elements - Activate Objects
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function