Using Service Tasks

A Service Task is an automatic task that gets triggered in the Process flow.

Service tasks help to execute the business logic which is defined through an Application Rule of Execution Rule type. They are typically used to call External Model Service through REST APIs, External Java APIs, stored procedures, and functions.
To add a service task:
  1. From the Process Flow tab, click Service Task from the Activities pane in the floating toolbar and click on the Drawing canvas, at the required position.
  2. Double click Service Task in the drawing canvas, to access the Activity Drawer window.
  3. Enter the Activity Name and the Description.
    An unique Activity ID is auto-generated for the newly added human task.
  4. Click Task Implementation, to access the Implementation tab.
  5. Select the information domain where the Execution Rule you want to execute is available, from the Infodom drop-down list. The list displays all the Infodoms mapped to the services configured in your OFS Cloud services instance.
  6. Select the Execution Rule to be executed for this activity.
    1. Click Open Details to view the Participant Details with all Application Rules of Execution Rule types available in your process.
    2. Click an application rule to view the details.
    3. Select the required rule and click OK.
  7. Add the Parameters you want to pass to the Execution Rule using Data Fields. You can pass Static values or Dynamic Values. In the case of Dynamic, the value needs to be entered during the execution of the workflow.
    1. Click Add under Parameters, to access the Binding Details.
    2. Select the Data Field to which you want to pass the value. The list displays all Data Fields for the current process or package.
    3. Select Static from the Parameter Type list to pass a static value to the selected data field in the Value field or Dynamic to pass the value during execution of the workflow.

      Note:

      The added parameters are displayed under the Parameters pane. Click Edit Parameter corresponding to a parameter to edit it or click Delete, to delete the parameter.
  8. Select an application rule which you want to execute before executing the Execution Rule.
    Click Open Details corresponding to the Pre-Rule and select the required application rule.
  9. Select an application rule which you want to execute after executing the execution rule.
    Click Open Details corresponding to the Post-Rule and select the required application rule.