MODIFY_UC_OBJECT
Script Function: Modifies the attribute of an activated object.
Syntax
MODIFY_UC_OBJECT (RUN#, Attribute, Value)
Syntax |
Description/Format |
---|---|
RunID |
Run number of the activated object. Note for using the attribute EARLIEST_STARTTIME: Indicate the RunID of the workflow to which the task belongs (not the task's RunID). |
Attribute |
Attribute that should be modified. |
Value |
Value that should be set. |
Return code |
---|
"0" - Attribute was successfully modified. For the attribute IGNORE_SYNC applies: For the attribute PRIORITY applies: For attribute RELEASE applies: For the attribute RESPONSE applies: For the attribute GR_MAX_PAR_JOBS apply: The following applies to the attributes GOIMM,
EARLIEST_STARTTIME and REMOVE_DEPENDENCY: For there attribute GAP applies: |
Comments
The attributes of the activated objects shown in the table below can be modified. The new values are only valid for the current execution of the task and are not stored in the object.
Object type |
Attribute |
Value |
---|---|---|
CALL |
RESPONSE Reaction to a notification |
"OK" = Acknowledge notification (message) "YES" = Respond to notification (request) with "Yes". "ACCEPT" = Accept notification (Alert) |
JOBG | GR_MAX_PAR_JOBS Maximum number of parallel running tasks in a group |
1 to 999 parallel running tasks. |
JOBP | RELEASE Releasing a blocked workflow |
RUN# of the blocked task in the workflow. |
|
For the following three attributes, the task that should be changed must be in the status "Waiting for precondition". |
|
|
GOIMM |
Task name that must not be used in the workflow more than once. |
|
EARLIEST_STARTTIME |
Either enter the earliest start time or the keyword "OFF". In both cases, the script function requires the task name. Syntax for the parameter Value: Task
name, [Time
format;]Time The start time is assigned to the task or replaces an already existing one. The script function expects the time in the format "HHMMSS" if no particular format has been defined. The keyword "OFF" removes an existing start time. |
|
REMOVE_DEPENDENCY |
The task ignores the expected end status (Time & Dependencies tab) of the indicated predecessor. As a result thereof, the task continues if it reaches this task provided that all other predecessors have already ended. Syntax of the parameter Value: Task name [, Predecessor's name ] All predecessors are ignored and the task starts immediately if no particular predecessor is indicated. |
CALL, JOBF, JOBP, JOBS, JSCH, SCRI |
PRIORITY |
Allowed values: 0 to 255 |
Workflow tasks | IGNORE_CONDITIONS | Starts a workflow task that is in the status "Waiting for Preconditions" immediately. The parameter value is not required. See Preconditions, Postconditions, Conditions . |
Workflow tasks | CHECK_CONDITIONS | Starts checking the conditions/actions of a workflow task that are in the status"Waiting for Preconditions" from the beginning. The parameter value is 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. The parameter value is not required. |
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, "") |
Recurring tasks |
GAP |
Changes the time gap between the executions in a recurring task. Value in minutes. |
All executable objects |
SET_EXPRESS |
Starts a task that is in the status "Waiting for resource" immediately (JOBS, JOBF and JOBD). Allowed values: "ON" and "OFF" |
Using this script function for modifying a task requires that it has already been generated but is still in a waiting condition. The option Generate at runtime must not be set. To modify a task at its generation time, use the script statement :PUT_ATT .
The reaction to occurring errors can be specified using the script statement :ON_ERROR. Errors can be analyzed using the script functions for error handling. By default, script processing continues, but it can also be canceled.
This script statement has the effect that all the script's open transactions are written to the AE database.
Examples
The first example shows how a notification (request) is acknowledged. In a first step, the RUN# must be determined and then saved to the script variable "&RUNNR#".
:SET &RUNNR# = ACTIVATE_UC_OBJECT("Nightshift")
!...
:SET &MODOBJ# = MODIFY_UC_OBJECT(&RUNNR#,
RESPONSE, OK)
In the second example, a group is activated and the RUN# is saved 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 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:
Adds recipients to a notification at runtime. | |
:PUT_ATT | Sets or changes attributes of objects. |
GET_ATT | Returns the values of a task's attributes during its generation. |
MODIFY_TASK | Modifies active workflows. |
:ON_ERROR | Determines the reaction to certain errors and messages of script elements. |
Script Elements - Read or Modify Objects
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function