Add Service Task

Service task uses web services to complete the task. For example, when an insurance claim is approved in the system the corresponding policy holder automatically receives a notification that is sent by a service task.

Perform the following steps::

  1. Navigate to the Process Model that you created.
  2. Select the Start Event or Task element that you 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 Service Task from the context menu.
  5. Select the service task that you added and specify the following properties:
    • Name: Enter a name for the task that you want to create.
    • Datasource: Select name of the datasource that includes the reference data for a web service call.
    • Method:Select a webservice method that is available in the selected datasource based on the operation that you want to perform. The Post and Put methods are not supported if the data type is File.
    • Attributes: Enter key-value pairs of the function attributes that you selected. Attributes are the columns that you specified as attributes in the corresponding datasource.
    • Response: Enter the name of the parameter where to store the response that is received from corresponding webservice method.
    • Advanced: Specifies the application related information that you want to pass to the webservice for processing along with the URL of the Method. Enter the key-value pairs to form the required headers.
    • Custom Script: Enter the Javascript that you want the application to automatically execute before or after the service task is executed. Click On Before and add your Javascript to execute the script before the task is initiated. Click On After and add you Javascript to execute the script after completing 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. The Script Task is added to the process model.