Workflow Scripts


Scripts are the most vital part for construction of workflow, as they enable you to execute custom processes. Script workspace provides a file management system, a script editor, access to Debug tool, and resources to assist you with syntax.

There are ten different types of scripts:

  1. Asynchronous Script: Enables you to execute large and time-consuming tasks or many small tasks. They can be typically called from other scripts such as Form Event, Workflow, Scheduled Task, etc. Mostly, it is used to create a case where we have Parent-Child workflow relation or is used where the values are updated in commission through REST API.
  2. Event Script: Enables you to execute a script associated with a global event and is mainly used while integrating with external systems and can be called when performing certain actions in Workflow administration workspaces.
  3. Exception Handling Script: Responds to exceptions that occur during script execution and also gathers information about them.
  4. Form Event Script: Mainly used to manage field behavior on the form. We can populate a table controller on the case, fetch data from the database, set values to custom fields, hide, and show fields on the form, etc. It can be used with the following actions before the form displays, after a change in a custom field value, on a form update, or upon form submission.

    – Workflow Action Form
    – Case Creation Form
    – Public Case Creation
    – Case Creation Widgets

    There are four subtypes of Form Event scripts:
    On Cell Change: Executes when an end-user enters data in a cell of the table controller.
    On Prepare: Executes when the table controller loads. It is also used to hide or show the column in table controller once it is populated
    On Update: Updates data in the table controller.
    On Select: Executes after an end-user selects a row.

  5. Internal Use Script: Is a child script and is called by other scripts for internal purposes. It can be created and used only using Script Editor.
  6. Scheduled Task Script: Used by scheduled task created in the system. It executes scripts at specific time periods. Typically used to perform updates on a group of cases that meet criteria.
  7. Unit Test Script: Used to create tests to validate that existing scripts return the expected result. It is the most useful script to unit test functionality in production.
  8. Utils Script: Used to manage common functions at one location and also to write database queries, common functions such as Case Team, Assignees, etc.
  9. Web Action: Used to create a script that is executed from an external web service call. This script is called from other applications using the HTTP Protocol.
  10. Workflow Script: Enables you to control fields and objects related to a case after a workflow action has been performed and data has been saved to the database to update case information, other internal objects, or external systems.


Read more SPM Tech Tips: SAP >>

Want to join our Tech Tip distribution? Join our community of SPM users to receive the latest information about SPM technology solutions.

Have a question for one of our SPM experts? We’re here to help! Submit your question and one of our experts will be in touch shortly.
OpenSymmetry Favicon

Stop searching. We have your answers.