MODIFY_UC_OBJECT

Use the MODIFY_UC_OBJECT script function to modify specific attributes of an activated object. If you assign new values to these attributes, these values are only valid for the current execution of the task and they are not stored in the object.

Syntax

MODIFY_UC_OBJECT (RunID, Attribute, Value)

Parameters

Parameter Description Format / Allowed Values
RunID

Run number of the activated object.

Note: If you use the EARLIEST_STARTTIME attribute, you must specify the RunID of the Workflow to which the task belongs and not the RunID of the task.

Script literal, number, or script variable
Attribute Attribute that should be modified. See below for the list of available attributes. AE name or script variable
Value Value that should be set for the attribute that you want to change. AE name, script literal, number, or script variable

Attributes

Depending on the object type, you can modify the values of various attributes:

Object Type Attribute Description / Syntax Allowed Values Specific Return Codes
CALL RESPONSE Reacts to a notification.

OK: Acknowledges a Notification (message).

YES: Responds to a Notification (request).

NO: Responds to a Notification (request).

ACCEPT: Accepts a Notification (alert).

REJECT: Rejects a Notification (alert).

DONE: Resolves a Notification (alert).

20539: The notification with the indicated RUN# does not exist.

20538: The value is incorrect.

11151: The value for the attribute RESPONSE does not apply for the notification type (alert, request, message).

11060: The combination notification and value is not supported.

11061: The notification was already acknowledged by a different user.

11062: The notification was acknowledged by a user who is not available in the notification.

1064: The notification was rejected by a user who is not available in the notification.

20859: The reaction to the notification was made by a user who is available in the notification but is inactive.

JOBG GR_MAX_PAR_JOBS Defines the maximum number of parallel running tasks in a group. 1-999

11121: The RUN# was not found.

20460: The value does not lie between 1 and 999.

JOBP RELEASE Releases a blocked Workflow. RUN# of the blocked task in the Workflow

11016: The Workflow to be changed does not exist.

11510: The Workflow is not active.

20540: The RUN# was not found.

JOBP GOIMM Starts a Workflow task immediately. The task must be in a Waiting for precondition status. The name of the task that must only be used once in the Workflow.

11557: The Job '&01' (RunID: '&02') has already been started through the Go Immediately option.

20378: The Workflow could not be found.

20840: The task appears in the Workflow more than once.

20841: The indicated task does not exist in the Workflow.

JOBP EARLIEST_STARTTIME

Modifies the earliest start time of a task in a Workflow. The start time is assigned to the task or replaces an already existing one. The task must be in a Waiting for precondition status.

Syntax: Task name, [Time format;]Time or Task name, OFF

Either the earliest start time in the format HHMMSS if no particular format is defined, or the keyword OFF which removes an existing start time. Requires the task name.

11557: The Job '&01' (RunID: '&02') has already been started through the Go Immediately option.

20378: The Workflow could not be found.

20840: The task appears in the Workflow more than once.

20841: The indicated task does not exist in the Workflow.

JOBP REMOVE_DEPENDENCY

Removes the dependency to the direct predecessor of the task. The task ignores the expected end status set in the Dependencies properties page of the specified predecessor. As a result, the task continues when it reaches this task if all other predecessors have already ended. The task must be in a Waiting for precondition status.

Syntax: Task name [, Predecessor's name ]

Task name and optional predecessor name. If no particular predecessor is indicated, all predecessors are ignored and the task starts immediately.

11557: The Job '&01' (RunID: '&02') has already been started through the Go Immediately option.

20378: The Workflow could not be found.

20840: The task appears in the Workflow more than once.

20841: The indicated task does not exist in the Workflow.

CALL, JOBF, JOBP, JOBS, JSCH, SCRI PRIORITY Task priority. 0-255

20591: The RUN# was not found.

20587: The value does not lie between 0 and 255.

Workflow tasks IGNORE_CONDITIONS Starts a Workflow task that is in a Waiting for Preconditions status immediately. For more information, see Configuring the Conditions, Preconditions, Postconditions Properties of a Task in a Workflow. Not required. -
Workflow tasks CHECK_CONDITIONS Starts checking the conditions/actions of a Workflow task that is in a Waiting for Preconditions status from the beginning. Not required. -
CALL, EVNT, JOBF, JOBG, JOBP, JOBQ, JOBS, JSCH, SCRI IGNORE_QUEUE Starts a task that is in a waiting condition because of insufficient queue slots immediately. Not required. -
JOBS, JOBF and JOBD SET_EXPRESS Starts a task that is in a Waiting for resource status immediately. ON or OFF -
All executable objects IGNORE_SYNC

Sync object settings are ignored. This parameter must be specified but its value is irrelevant.

Example: MODIFY_UC_OBJECT (&RUNNR#, IGNORE_SYNC, "").

Irrelevant 11191: The RUN# was not found.
Recurring tasks GAP Changes the time gap between the executions in a recurring task. Specified in minutes

20534: Value "0" is not allowed.

20591: RUN# was not found.

20860: This is not a recurring task.

20861: The option "With a gap of..." has not been selected in the recurring task.

Important Considerations

Keep the following behavioral rules and prerequisites in mind when utilizing this script function:

Return Codes

  • 0: Attribute was successfully modified.

  • 20342: This attribute is not supported.

Examples

The first example shows how you can acknowledge a notification (request). The first step determines the RUN# and stores it to the script variable "&RUNNR#":

: SET &RUNNR# = ACTIVATE_UC_OBJECT ("Nightshift")

: !...

: SET &MODOBJ# = MODIFY_UC_OBJECT (&RUNNR# 

  RESPONSE, OK)

The second example activates a group and stores the RUN# in a script variable. The number of parallel running tasks in the group is set to 1. Selected tasks can only be processed one by one:

: SET &RUNNR# = ACTIVATE_UC_OBJECT ("GRP7")

: SET &MODOBJ# = MODIFY_UC_OBJECT (&RUNNR# 

  GR_MAX_PAR_JOBS, 1)

The following examples show modifications that are made in tasks that run in a Workflow:

!The job "MM.CLOSING" should start immediately.

: SET &RUNNR# = GET_UC_OBJECT_NR (MM.DAY)

: SET &MODOBJ# = MODIFY_UC_OBJECT (&RUNNR# , GOIMM, "MM.CLOSING")

!The job "MM.CLOSING" should not run earlier than 3pm.

: SET &RUNNR# = GET_UC_OBJECT_NR (MM.DAY)

: SET &MODOBJ# = MODIFY_UC_OBJECT (&RUNNR# , EARLIEST_STARTTIME, 

  "MM.CLOSING""150000")

!The job "MM.CLOSING" should ignore the earliest start time.

: SET &RUNNR# = GET_UC_OBJECT_NR (MM.DAY)

: SET &MODOBJ# = MODIFY_UC_OBJECT (&RUNNR# , EARLIEST_STARTTIME, 

  "MM.CLOSING" 

  OFF)

!The job "MM.CLOSING" should ignore the dependency to the predecessor "MM.DAY_END".

: SET &RUNNR# = GET_UC_OBJECT_NR (MAWI.TAG)

: SET &MODOBJ# = MODIFY_UC_OBJECT (&RUNNR# , REMOVE_DEPENDENCY, 

  "MM.CLOSING" 

  "MM.DAY_END")

See also: