Add Script Task

A script task represents an automated activity. You can write code for the Script Task to automatically execute when the application execution arrives at the Script Task in run time. For example, when the user fills a form and submits insurance claim, the application generates an ID and associates with the claim submitted.

Perform the following steps::

  1. Navigate to the Process Model that you created.
  2. Select the Start Event or Task element that you already added to the process model.
  3. From the context menu, select Task element and drop it next to the selected element.
  4. Select the Task element and click Type and then click Script Task from the context menu.
  5. Select the script task that you added and specify the following properties:
    • Name: Enter a name for the task that you want to create.
    • Custom Script: Enter the Javascript that the application can execute in run time to automatically complete the task. Your javascript can include only the syntax and objects as defined in ES5 edition. The browser objects such as JS Window, JS Document, and JS AJAX are not supported.
  6. Click Save.
  7. Script Task is added to the process model.