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

Attributes

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

Notes:

General return codes

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

Tip: Use the :ON_ERROR script statement to define the action that should be taken if the modification fails. For more information, see Script Elements for Error Handling.

See also:

seealso

Script Elements for Handling Tasks