Scripts of the type Workflow

When using scripts in a workflow, you can either save the scripts within the workflow or reference a script stored on the Scripts page of the Web Admin Suite from within the workflow. Saving workflow scripts on the Scripts page is useful if the same script is used in several places, e.g., in different activities or workflows. In addition, scripts can be tested more easily during workflow development because changes to scripts on the Scripts page take effect immediately after saving, so you do not have to deploy the workflow.

Steps to use a workflow script:

  1. Write a script of the type Workflow on the Scripts page.

  2. Reference the script from the desired workflow item, e.g., a workflow activity.

    scriptExecutionService.execute("myscript.groovy")

    Optionally, you can pass parameters to the script, e.g., the case:

    def params = [ "myticket": workflowApi.ticket ]

    scriptExecutionService.execute("myscript.groovy", params)

You can find detailed information about workflow programming in Workflows.