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 objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task.


Syntax

MODIFY_UC_OBJECT(RunID, Attribute, Value)

Syntax

Description/Format

RunIDShort for "run number". It is a number that provides unique information about a task's execution. The RunID can include 7 to 10 digits. It is assigned by the Automation Engine component .

Run number of the activated object.
Format: script literal, number or script variableA placeholder for a value within a script.

Note for using the attribute EARLIEST_STARTTIME: Indicate the RunID of the workflowAn object of the Automation Engine that can include several executable objects and which runs them in a specified order. [Formerly called "ProcessFlow" and "JobPlan."] to which the taskAn executable object that is running. Tasks are also referred to as activities. 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, scriptA particular Automation Engine object type. 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 notificationAn Automation Engine object type used to send messages to users and user groups. [Formerly called "CallOperator."] 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 userIn the Automation Engine, a user is an instance of a User object, and generally the user is a specific person who works with Automic products. The User object is assigned a user ID and then a set of access rights to various parts of the Automation Engine system and product suite. These access rights come in the form of Automation Engine authorizations and privileges, Decision user roles and EventBase rights and ARA web application object rights. You can manage all these centrally in the ECC user management functions. See also, Unified user management..
"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 groupAn Automation Engine object type that integrates tasks so that they can be processed together.
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 statusThis represents the condition of a task (such as active, blocked, generating). "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 functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… 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 queueA particular Automation Engine (AE) object type. In AE, a queue determines the maximum number of concurrent tasks, their priorities and the order in which tasks should be executed. In ARA, queues are containers for workflow executions that should be executed at a certain time one after another. slots immediately. The parameter value is not required.

All executable objects

IGNORE_SYNC

Sync objectIt synchronizes executable objects based on defined states and actions. A particular Automation Engine object type. 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 runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start). 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 variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. "&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

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH