Call Service

Requires deployed extension LB Services into Sugar Environment.

LB Services is used to call logic configured with a flowchart:

  • from another flowchart
  • from SugarBPM
  • from an external system through Sugar REST API
  • from custom code (e.g. buttons)

Calls Service from the flowchart. Allows calling a flowchart from the other flowchart. Useful when the same logic is repeated in several flowcharts, so repetitive logic can be separated into flowchart and then called when needed. Also can be used to separate one complex logic into several sub-logics, when instead of one enormous flowchart it will be several smaller and easier to read.

A flowchart that implements a selected service is called when a flow reaches the operator Call Service and provides a result if the result was defined.

inputs:

service name – select service to call from the list. The list is composed of the records of LB Services Module from Sugar which metadata was imported to the current project.

  • Required: yes

select service arguments that were defined for this service in the record of LB Services Module in the following dropdowns and link them with its values.

  • Required: no

outputs:

result – value that was set in called service in result input port of Set Service Result

Example of usage

Let’s say there are a bunch of flowcharts with the same steps to create a Task. Instead of performing the same steps in each flowchart, it is possible to create the Service and then re-use it.

Step 1 – Register Service in Sugar.

For this, just create a record in LB Services module and provide arguments that are needed to be filled to create Task:

N.B. Each time you add a new Service into Sugar it is needed to update the Metadata in the Logic Builder project to work with the newly added Service.

Step 2 – Crete a Flowchart starting from On Service Call to create a Task using parameters that will be input in the Service. In a result input the Task ID.

Step 3 – Deploy the flowchart into Sugar. Now you can use created Service in other flowcharts, e.g when Case with Type Product is added. Also, it is possible to link the Task to other entities using result output port from the Call Service:

Click to rate this post!
[Total: 0 Average: 0]

Leave a Reply

Your email address will not be published. Required fields are marked *