Script

This trigger allows to execute a script at any workflow node and conditionally evaluate the next node.

ParameterValue
TypeAction
Use documentNo
ConditionalYes
Max output2
ContextAll
Warning

Running piece of scripts may be harmful and dangerous. Make sure to know what the script is exactly doing and to run external delivered script only if is source is trusted and the script is secure.

Type
Select the type of script to execute according what provided in the Filename or the Code. Available types are:

  • Visual Basic Script
  • Java Script
Info

Scripts are executed server side inside services context, make sure to do not use client side objects which might not work or hang services.

Info

Visual basic Script is executed at 32bits while Java Script is executed natively at 64bits. Java Script is strongly suggested as preferred scripting type.

Arguments
By using arguments you can send additional parameters to a script. This might come in handy if you create one script which you want to use in different templates, in this case you could send the workflow name as a parameter, which can be used in the script to perform differently depending on the workflow which invoked the script.

For example, you can enter /Workflow=CheckForms here, and retrieve the value in the VB Script by using my_var=Arguments.Values(“Workflow”)

Filename
Browse to or enter the script filename, or click on the Variables button on the right, to select a variable which will contain the script filename.

Info

Browse allows to upload the script to the server, this operation stores the script file in the local Scanshare data folder.

Warning

For security and privacy reasons the filename is always referring to the Scanshare data folder and not to a full absolute path. Do not insert absolute paths which will generate instead an error.

Code
In this field you can manually write a script which will be stored inside the trigger settings or use variables to use dynamic script code / variables.

To customize the output condition make sure the script code, either language type, will return a variable called RESULT which contains the a boolean value type of the condition: TRUE or FALSE.

If the variable RESULT is omitted the conditional result is assumed to be automatically and always TRUE.

Refer to the Appendix – Scripting section for more information about Scripting in general inside Scanshare.

Previous Article

Mail

Next Article

Condition