Automation Engine Script Guide > Ordered by Function > Read or Modify Objects > MODIFY_TASK

MODIFY_TASK

Script function: Modifies active workflows.

General information

Workflow modifications are made in several steps using MODIFY_TASK:

  1. Stop the workflow by using the status STOP_MODIFY.
  2. Make one or several modifications.
  3. Activate your modifications using the status COMMIT.
  4. Start the workflow by using the status GO.

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.
"9" - The user is not authorized to modify the specified task at runtime.
"20591" - A workflow with this RunID does not exist or is no longer active.
"20738" - The task is in a status in which modifications are not possible.
"20739" - The task cannot be modified because it is being modified by another user.
"20740" - An invalid object type has been specified.
"20741" - There is no task that shows the specified name and/or running number.
"20742" - The specified task name does not comply with the specified running number.
"20743" - The task cannot be modified because the corresponding workflow has not been stopped for editing purposes.
"20744" - The task cannot be modified because it is in an unmodifiable status.
"20745" - The task cannot be modified because the value is not allowed.
"20746" - It is not possible to add a dependency because it already exists.
"20747" - A dependency cannot be modified because it is in an unmodifiable status.
"20748" - It is not possible to add a task because this position is already used by another task.
"20749" - The object type of the indicated task is not valid.
"20750" - The function cannot be processed for this task with the particular RunID because of a previous error.
"20752" - External tasks can only be replaced by external tasks.
"20753" - <START> and <END> cannot be replaced.
"20754" - <START> must not have a predecessor.
"20755" - <END> must not have a successor.
"20756" - External tasks must not have a predecessor
"20757" - An invalid task has been specified for the modification of an external dependency.
"20758" - It is not possible to indicate external dependencies.

ADD_TASK: 

Running number of the added workflow task.
"0" - The task could not be added.

REPLACE_TASK:

Running number of the new workflow task.
"0" - The task could not be replaced.

 


Start, Stop and Commit

Syntax

MODIFY_TASK (RunID, Status, [FORCED])

Syntax

Description/Format

RunID

Running number (RunID) of the activated workflow.
Format: script literal, number or script variable

Status

Processing status that should be set for the task.
Format: AE name, script literal or script variable

Allowed values: COMMIT, GO, STOP and STOP_MODIFY

"COMMIT" - Activates modifications without starting the workflow.
"GO" - Starts a stopped workflow. Use the parameter FORCED to start a workflow even if its Monitor is open for editing purposes.
"STOP" - Stops a workflow.
"STOP_MODIFY" - Stops a workflow for modification purposes.

FORCED

Should be used in combination with the parameter "GO". FORCED starts a stopped workflow even if its Monitor has been opened for editing purposes. Possible modifications made by a different user are lost.

Comments

This script function modifies the processing status of a workflow.

Examples

The workflow "MM.DAY" is stopped. Subsequently, it is modified.

:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RET# = MODIFY_TASK(&RUNID#, STOP_MODIFY)

The workflow "MM.DAY" starts.

:SET &RUNID# = GET_UC_OBJECT_NR("MM.DAY")
:SET &RET# = MODIFY_TASK(&RUNID#, GO, FORCED)

 


Modifying workflow Structures

Syntax

MODIFY_TASK (RunID, object name,, ADD_TASK [EXTERNAL, workflow name])

Syntax

Description/Format

RunID

Running number (RunID) of the activated workflow.
Format: script literal, number or script variable

Object name

Name of the object that should be inserted in the workflow.
Format: script literal, number or script variable

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.

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.
Format: script literal, number or script variable 

Task name
running number

Name or running number of the workflow task that should be replaced.
Format: script literal, number or script variable. Within a workflow, a task can be 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.

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.
Format: script literal, number or script variable 

Task name
running number

Name or running number of the workflow task that should be moved.
Format: script literal, number or script variable

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 Parent)

Syntax

Description/Format

RunID

Running number (RunID) of the activated workflow.
Format: script literal, number or script variable 

Task name
running number

Object name or running number of the workflow task that should be moved.
Format: script literal, number or script variable

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).
Format: AE name, script literal, number or script variable

The same limitations apply for alias names and for object names:
Maximum length: 200 characters
Allowed characters: A-Z, 0-9, $, @, _, -, .

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) 

 


General 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.
Format: script literal, number or script variable 

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
Format: script literal or script variable

Allowed values: 

Time stamp in the format TT/HH:MM - Sets a checkpoint using this time stamp.
"NONE" - Removes the checkpoint

Time zone

Name of a TimeZone object.
Format: script literal or script variable

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)

 


Earliest 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.
Format: script literal, number or script variable

Task name

 

Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
Format: script literal or script variable

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.
"NONE" - Removes the earliest starting time

Time zone

Name of a TimeZone object.
Format: script literal or script variable

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.
Format: script literal, number or script variable 

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
"NO" - Sets the workflow to inactive. Processing does not start 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.
Format: script literal, number or script variable 

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
"NO" - Removes a breakpoint from 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)

 


Dependencies 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.
Format: script literal, number or script variable 

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
Format: script literal or script variable

Allowed values: 

Time stamp in the format TT/HH:MM - Sets a latest starting point using this time stamp.
"NONE" - Removes the latest starting point.

Time zone

Name of a TimeZone object.
Format: script literal or script variable

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.
Format: script literal, number or script variable

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
Format: script literal or script variable

Allowed values: 

Time stamp in the format TT/HH:MM - Sets a latest ending time using this time stamp.
"NONE" - Removes the latest ending time.

Time zone

Name of a TimeZone object.
Format: script literal or script variable

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.
Format: script literal, number or script variable 

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
"ONE" - At least 1 status 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], Status)

Syntax

Description/Format

RunID

Running number (RunID) of the activated workflow.
Format: script literal, number or script variable 

Successor task name
Running number

Name or running number of the successor task.
Format: script literal, number or script variable

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.
"MODIFY_DEPENDENCY" - Modifies a dependency.
"REMOVE_DEPENDENCY" - Removes a dependency.

Task name
Running number

Name or running number of the task whose dependency should be changed.
Format: script literal, number or script variable

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.
Format: script literal or script variable

Allowed values: "End status" and "NONE"

"End status" (for example, ENDED_OK)
"NONE" - The preceding task's end status is not monitored.

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.
Format: script literal, number or script variable 

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
"BLOCK" - The workflow blocks at the preceding task.
"BLOCK_ABORT" - The workflow blocks at the preceding task and sends an abort message to the superordinate workflow (if existing).
"SKIP" - The workflow task is skipped.

Alarm object

Object that should start if the checkpoint is exceeded.
Format: script literal or script variable

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)

 


Runtime Tab

Syntax

MODIFY_TASK(RunID, [Task name], [Running number], Runtime option, Value)

Syntax

Description/Format

RunID

Running number (RunID) of the activated object.
Format: script literal, number or script variable 

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
"RUNTIME_MRT_NONE" - No specified maximum runtime.
"RUNTIME_MRT_FIXED" - Fixed value for the maximum runtime.
"RUNTIME_MRT_ERT" - ERT plus percentage for the maximum runtime.
"RUNTIME_MRT_TIME" - Current date plus period for the maximum runtime.
"RUNTIME_SRT_NONE" - No minimum runtime.
"RUNTIME_SRT_FIXED" - Fixed value for the minimum runtime.
"RUNTIME_SRT_ERT" - ERT minus percentage for the minimum runtime.
"RUNTIME_ELSE_ACTION" - Else action for deviant runtime.

Value

The value depends on the particular runtime option:

For "RUNTIME_USE_TASK_SETTINGS": YES and NO
."YES" - The task's runtime options are used.
"NO" - The runtime options specified in the properties are used.

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]
"TT" - Days that should be added to the current date.
"HH:MM" - Time
Time zone to which the time stamp should be converted.

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]
Else action - "CANCEL" (task is canceled/ended) and "NONE" (no Else action takes place)
Alarm object that should start if the expected runtime is exceeded.

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)

 


External Dependency 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.
Format: script literal, number or script variable 

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
Format: script literal or script variable

Allowed values: LOGICAL_DATE, LAST_EXECUTION, BEFORE_START and AFTER_START

"LOGICAL_DATE" - Only valid if activated with the same logical date.
"LAST_EXECUTION" - Since last workflow execution.
"BEFORE_START" - Within a period before the workflow starts.
"AFTER_START" - After the workflow starts.

Duration

Period for the option "BEFORE_START" in the format "HH:MM:SS."
Format: script literal or script variable

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.
Format: script literal, number or script variable 

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
Format: script literal or script variable

Allowed values: "End status" and "NONE"

"End status" (for example, ENDED_OK)
"NONE" - The system only checks whether the task ended within the lead time. Its status is irrelevant in this case.

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.
Format: script literal, number or script variable

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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
"SKIP" - Skips
"CANCEL" - Cancels the workflow.

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.
Format: script literal, number or script variable

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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.
Format: script literal or script variable

Action

Allowed values: WAIT, SKIP and CANCEL.

"WAIT" - Wait
"SKIP" - Skip
"CANCEL" - Cancels the workflow.

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)

 


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.
Format: script literal, number or script variable 

Task name
Running number

Name or running number of the workflow task.
Format: script literal, number or script variable

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:

  • Object variable - modify existing variable value or create new variable with specified value
  • PromptSet variable - modify existing variable value of a PromptSet control
Promptset name or "<VALUE>"

Name of PromptSet = name of PromptSet object

"<VALUE>" = specifies an Object variable (e.g. "&myvar#")

Variable 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)

  • SELECT = select rows of an array (PromptSet controls: e.g. check list, checkbox)
  • DESELECT = deselect rows of arrays
  • CLEAR = deselect all rows of an array

To modify all non-array (PromptSet controls value, object variable value)

  • SPACE (default) = empty text
   

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.