ActionScript Start
ActionStep Reference » Programming » Script » ActionScript Start
The Start ActionStep runs a specified ActionScript located in the workspace. The ActionScripts executed by this ActionStep are considered child scripts. It is important to note that a called ActionScript must be accessible within the same workspace environment.
XenoGuard distinguishes between two types of script execution: synchronous and asynchronous. In synchronous execution, which is the default setting, the calling script waits until the child script has been completely processed and terminated before it executes its subsequent ActionSteps.
Asynchronous execution, on the other hand, allows for true concurrent (parallel) execution of scripts. In this mode, the caller initiates the child script but does not wait for its completion and continues executing its next ActionSteps. The child script operates independently of the caller. To utilize this execution mode, you need at least the Plus or Premium version of XenoGuard.
- Open the Programming node in the Workspace Explorer.
- Open the ActionScript node, select the Start ActionStep.
Parameters:
The ActionStep has the following input parameters:
name |
Description
|
---|---|
File Path
|
Specifies the path of the ActionScript to start.
Allowed Context Scope [Fixed] |
Execution Mode
|
The mode of execution of the child script.
Allowed Context Scope [Fixed]
Allowed Values [Synchronously, Asynchronously] |
Carry Over Error State
|
Specifies whether a child script error should be passed up to the parent script.
Allowed Context Scope [Fixed] Allowed Context Type [Boolean] |
Result to Parent |
Specifies whether all result parameters should be transferred from the child script to the parent script.
Allowed Context Scope [Fixed] Allowed Context Type [Boolean] |
ActionScript Parameters
|
The parameters passed to the ActionScript.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Results:
The ActionStep returns the following results:
name
|
description
|
---|---|
ActionScript Result |
Contains the result of the ActionScript.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter] |
The node ActionScript Parameters contains all input parameters from the child ActionScript. These are defined with Define Parameter.
|
Example 1 (Synchronously calculate the sum in a child script):
This example assigns the value of two local variables, numValue 1 and numValue 2, as ActionScript parameters. Both have Number as data types. The Result after calling the child ActionScript is then output via Message Box.
The master ActionScript:
This is the child ActionScript that will be called by the master ActionScript:
Example 2 (Start two ActionScripts asynchronously):
In this example, the AactionScript add_profiledata.xen is started asynchronously twice. Then, the Wait ActionStep is used to wait until the asynchronous ActionScripts finish their execution before another script is executed.
The master ActionScript:
This is the ActionScript that is started asynchronously:
This is the second ActionScript that is started synchronously:
See other ActionScript operations:
Wait
Return
Cancel
Write Error
Write Result
Append Result