UC_CAUSE* ReadBuffer Variables
In some situations it is helpful to use the scripts of executable objects to read specific variables from the read buffer. The supplied values are derived from the activating object.
Values for read buffer variables are only available if the object has been activated via:
- An executable object - Runtime Page - Else: Execute
- Workflow, RemoteTaskManager, Schedule - Attributes Pages of Executable Objects- Result evaluation per single task - Else
- Notification - Notification Object (CALL) - Escalation - Notification
- Workflow - Properties - Tabs: Time & Dependencies, Runtime Properties, Preconditions, Postconditions, Conditions and External dependency
- Schedule - Properties - Schedule Objects (JSCH)
- UC_HOSTCHAR_DEFAULT - EXECUTE_ON*
If the task has been activated in a different way, the variables do not include a value.
The following read buffer variables are available:
- UC_CAUSE_NAME - The name of the causing task (= the task that has started the object).
- UC_CAUSE_NR - The RunID of the causing task.
- UC_CAUSE_STATE - The status of the causing task.
- UC_CAUSE_RETCODE - The return code of the causing task.
You can retrieve the values using the script statement :READ. The following example reads all variables and then outputs their values in the report:
: READ &UC_CAUSE_NAME ,,
:READ &UC_CAUSE_NR,,
:READ &UC_CAUSE_STATE,,
:READ &UC_CAUSE_RETCODE,,
:PRINT "Causing task:"
:PRINT "Name: &UC_CAUSE_NAME"
:PRINT "RunID: &UC_CAUSE_NR"
:PRINT "Status: &UC_CAUSE_STATE"
:PRINT "Return code: &UC_CAUSE_RETCODE"
Notification objects of type ALARM include a script which can be used to read this data and write it to the notification text.