Open topic with navigation

TIBCO® BPM Enterprise 5.5.0

# Starting a Business Service

This topic provides an example that shows how calls to the Work Manager Services API can be used to start and update a business service.

Note: The following step-by-step description corresponds to the process shown in the diagram. The descriptions are from the perspective of the REST API. The process of performing operations using the REST API is explained with the help of an example.

Procedure
1. When you login to the client application and click Business Services, GET business services rest API is called passing in the following filter string. For more details, refer to API Explorer.
2. When you click Start on Business Service, the POST call of call instance is called. POST call of call instance passes the following parameters:
   module name
   process name
   version number
   /Instances is the moduleName name of module/package to query on.
   moduleVersion version of module/package to query on

       {
          "moduleName": "string",
          "processName": "string",
          "moduleVersion": "string",
          "data": "string"
       }

   The response returns the execution state, instance ID, activity information, and the payload.

       {
         "instanceId": "123",
         "moduleName": "/SampleProcesses/Sample Tests/SampleTests.xpdl",
         "moduleVersion": "1.0.0.20201106103914259",
         "processName": "SampleBusinessService",
         "state": {
           "state": "ACTIVE",
           "failedMessage": null
         },
         "activityInfo": {
           "activityId": "abc",
           "activityName": "UserTask",
           "activityPageflowName": "StartEvent",
           "activityData": "{\"body\":{}}",
           "activityProcessModuleName": "/SampleProcesses/Sample Tests/SampleTests.xpdl",
           "activityProcessModuleVersion": "1.0.0.20201106103914259"
         }
       }

3. If Business Service has a form associated with it, Work presentation WorkitemPageFlow GET rest API is called by passing the module name, version, and process name that is returned in the earlier call.
   /WorkItemPageFlow is the Pageflow associated with the work item.
   processName: the name of the Process Template to query on.
   moduleVersion: the version of the Package to query on.
   The response returns form details for the activities of the process associated with the process name that is passed as part of the request. Form identifier points to the form that represents the user task activity in the business service. The form is rendered by the client for the user to enter the following details:

       [
         {
           "moduleName":  "/SampleProcesses/Sample Tests/SampleTests.xpdl",
           "processName": "SampleBusinessService",
           "moduleVersion": "1.0.0.20201106103914259",
           "pageflowActivities": [
             {
               "activityName": "UserTask",
               "activityId": "_r_2wp49sEeq3q_CEUhibZA",
               "formIdentifier": "com.example.sampleprocesses_1.0.0.20201106103914259/wp/openspaceGWTPull_DefaultChannel/.default/SanityTests/GetandViewDataStartEvent/UserTask/UserTask.gwt.json"
             }
           ]
         }
       ]

4. After you enter the details and click the submit button of the form, PUT call of instance is called. The data received from the Form is updated and the data is submitted back to the server.
   /Instances Updates a specified Process Instance.

       {
         "instanceId": "123",
         "moduleName": "/SampleProcesses/Sample Tests/SampleTests.xpdl",
         "moduleVersion": "1.0.0.20201106103914259",
         "processName": "SampleBusinessService",
         "state": {
           "state": "ACTIVE",
           "failedMessage": null
         },
         "activityInfo": {
           "activityId": "abc",
           "activityName": "UserTask",
           "activityPageflowName": "StartEvent",
           "activityData": "{\"body\":{}}",
           "activityProcessModuleName": "/SampleProcesses/Sample Tests/SampleTests.xpdl",
           "activityProcessModuleVersion": "1.0.0.20201106103914259"
         }

Subtopics

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® BPM Enterprise

Copyright © 2015-2024. Cloud Software Group, Inc. All Rights Reserved.