The Script Action enables the execution of script written in languages like Jscript and VBScript from the workflow. When this action is included in the workflow it calls the Run method in the script. The references to the assemblies made in the script are taken from the action properties. The string value returned from the Run method of the script is assigned to the Output parameter. The Script action executes the script and gives the return values specified in the properties. The link matching this value is picked up to continue workflow execution.
The Properties defined for the Script action are explained in the table below.
|
Property |
Description |
|
Language |
This property specifies the language of the script to be run. This property can be set to 'Jscript' or 'VBScript' depending on the scripting language required. |
|
This property specifies the code of the script to be run. |
|
|
This property specifies the global objects that can be referenced in the script. |
|
|
The return values specified in the script. These values become the conditions for the workflow engine to pick up the next action to execute. |
|
Property settings for Script |
To set the properties for the Script action, click on the Script icon. A list of properties for the Script action will be displayed in the Properties pane. Enter an appropriate name and description for the Script command and set all the properties. |
![]() |
To enter the code, click on the button for the 'Code' property. A window pops up (Fig 2.), in which the code can be entered. After entering the code click the Update button. |
![]() |
To specify the References, click on the button for the 'Reference' property. A window pops up (Fig 3.), in which the reference objects can be specified. Click the Remove selected button to clear earlier values. Enter the reference object in the 'References' field and the corresponding assembly path in the 'Assembly Path' field. Click the New row button to add additional rows of references. After specifying the references, click the Update button. |
![]() |
To specify the Return Values, click on the button for the 'Return Values' property. A window pops up (Fig 4.), in which the return value(s) can be specified. Click the Remove selected button to clear earlier values. Enter the return value in the 'Return Value' field. Click the New row button to add additional rows of return values. After specifying the return value, click the Update button. |
![]() |