ScriptEigener Objekttyp in der Automation Engine Statement: Assigns a SyncSynchronisiert aktivierbare Objekte auf der Grundlage definierter Zustände und Aktionen. Auch ein eigener Objekttyp in der Automation Engine. object to a task
Syntax
:ATTACH_SYNC [Object type], [RunID], Sync Object, [Start Action], [Abend Action], [End Action], Other, [NEXT_OBJECT]
Syntax |
Description/Format |
---|---|
Object type |
Short Label of an executable object |
Run number (RunID) of the object |
|
Sync object |
Name of a Sync object with which the task should be synchronized |
Start action |
Action that should be carried out when the task starts |
Abend action |
Action that should be carried out when the task ends abnormally |
End action |
Action that should be carried out when the task ends |
Other |
Task handling if neither Start Action, Abend Action nor End Action can be processed. Format: script literal or script variable Allowed values: "A", "W" or "S" "A" - Abnormal end (Abend) |
NEXT_OBJECT |
The Sync object should be assigned to the direct child in
a workflow Format: script literal or script variable |
Comments
With this script statement, a Sync object can be added to a task that has already been activated. This is a temporary assignment - it is only valid for the particular execution. Object type is an optional parameter as the object type can be clearly identified by its run number (RunID).
You can also use this script statement to assign a Sync object to one of the following tasks of a workflow, thereby influencing further processing. The option Generate at runtime must be activated in tasks whose scripts contain a script statement. The following task - to which a Sync object should be assigned - must already have been activated and have its own RunID.Thus, the option Generate at runtime must not be activated. The parameter NEXT_OBJECT can be used to assign a Sync object to the direct child of a task in a workflow. The only restriction is that there must not be more than one child.
This script statement can also be used to assign a Sync object to the own task. The corresponding Sync object conditions can vary. Indicating the parameter RunID is optional. A comma for this non-used parameter, however, has to be set in any case. The option Generate at runtime must not be activated in this case as the check for Sync objects is already finished when the script is being executed.
This script element does not affect Script objects. Script objects are complete after their generation stage and the synchronization process takes place at a later point in time.
Assigning a Sync object to a different task that has already been activated, is only possible with particular states. Either the task has not yet been started (system return code < 1540) or is still in a waiting condition (system return code between 1600 and 1700). Any other task status results in a runtime error and the script is canceled.
Examples
In the first example, the Sync object "SYSTEM_0001_EXCLUSIVE_SYNC" is added to the job "ARCHIVE01". If the indicated actions cannot be executed, the job is canceled.
:SET &RUNNR#
= GET_UC_OBJECT_NR(ARCHIVE01)
:ATTACH_SYNC &RUNNR#,"SYSTEM_0001_EXCLUSIVE_SYNC","USE","RELEASE","RELEASE","A"
In the second example, the Sync object is assigned to the directly succeeding task in the workflow.
:ATTACH_SYNC ,"SYSTEM_0001_EXCLUSIVE.SYNC","USE","RELEASE","RELEASE","A","NEXT_OBJECT"
See also:
Script element | Description |
---|---|
Executes the defined action of a Sync object | |
GET_SYNC | Queries the current condition or value of a Sync object |
Script Elements - Reading or Modifying Objects
Sync Objects
System Return Codes of Executable Objects
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function