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

MODIFY_UC_OBJECT

Script Function: Modifies the attribute of an activated object.


Syntax

MODIFY_UC_OBJECT(RunID, Attribute, Value)

Syntax

Description/Format

RunID

Run number of the activated object.
Format: script literal, number or script variable

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

Value

Value that should be set.
Format: AE name, script literal, number or script variable


Return code

"0" - Attribute was successfully modified.
"20342" - This attribute is not supported.

For the attribute IGNORE_SYNC applies:
"11191" - The RUN# was not found.

For the attribute PRIORITY applies:
"20591" - The RUN# was not found.
"20587" - The value does not lie between 0 and 255.

For attribute RELEASE applies:
"11016" - The workflow to be changed does not exist.
"11510" - The workflow is not active.
"20540" - The RUN# was not found.

For the attribute RESPONSE applies:
"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/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.
"11064" - The notification was rejected by a user who is not available in the notification.
"20859" - The reaction to the notification was made be a user who is available in the notification but is inactive.

For the attribute GR_MAX_PAR_JOBS apply:
"11121" - The RUN# was not found.
"20460" - The value does not lie between 1 and 999.

The following applies to the attributes GOIMM, EARLIEST_STARTTIME and REMOVE_DEPENDENCY:
"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.

For there attribute GAP applies:
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.

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".
"NO" = Respond to notification (request) with "No".

"ACCEPT" = Accept notification (Alert)
"REJECT" = Reject notification (Alert)
"DONE" = Resolve 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
A workflow task is started immediately

Task name that must not be used in the workflow more than once.

 

EARLIEST_STARTTIME
Modifying the earliest start time of a task in a workflow

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
or
Task name,
OFF

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
Removing the dependency to the direct predecessor

The task ignores the expected end status 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
Task 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.
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 databaseA database is an organized collection of data including relevant data structures..

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:

:ADD_ATT

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