You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

 

 

 Scripting Events

Script Event

Parameters

Description

BeforeAction

Action : <TAction>
The instance of the current action. The action will have the standard properties of any action with the addition of those specific to this action listed above.
SkipAction : Boolean
 

Called before the action is executed. When called all properties on the action have been initialised to those provided in the action editor dialog. Properties which have not been provided are set to their defaults.

Use this event to change anything about the action or perform operations which need to occur before the action is run. Also this event can be used to skip an action entirely. If the action is skipped it will report as such in the log, and no more processing of the action or its scripts will occur.

Run-time errors in this script will stop the action from running and the action will report as failed.

AfterAction

Action : <TAction>

ActionResult : boolean

Continue : boolean

Called after the action has executed. All properties on the action will be the same as when the action was run. Any properties which change during the run will be available at this point (e.g. Exit codes properties).

This event allows for the handling of action error states where are not directly handled by the action itself. For example if an error code is acceptable in certain circumstances it can be logged and ignored through this event.

Conversely a successful run condition which is not desirable in certain circumstances could be reported through this event. To achieve these outcomes set the ActionResult and Continue parameters to values which reflect the true outcome of the actions run.

Run-time errors produced by this script will cause the action to report as failed. Setting of either the ActionResult or Continue parameters will not override this.

OnStatusMessage

Action : <TAction>

StatusMessage : string

Called whenever the action generates a log message.

Actions will generate this event when the action has received output from the tool it has called, or when the action itself has something to report. The StatusMessage may contain zero-to-many lines of text and is in the format directly seen in the log.

As formatting depends on the tool being used we advise using the RegExp function to parse the output if required.

Run-time errors produced by this script will cause the action to report as failed.

  • No labels