Integrate Process with Microflow
Last updated
Last updated
Process can be integrated with an external UX/UI or can be integrated with other systems using the REST APIs provided by ONEWEB Process Designer. Though Process Runtime provides REST APIs sometimes they are integrated using Microflows to provide a common API for integrating with multiple systems. In this section we will talk about how to control and execute the process flow using Microflow engine.
In the Microflow we will use the Web Service node to call the different APIs of the process Runtime.
Start a Process from Microflow Assume if you need to start a process inside your Microflow. 1. Add a Web Service Node to your Microflow & click on the Web Service Node to open Configuration Panel 2.Open the Web Service Parameter tab 3. Select Web Service Type as REST 4. Click on the REST Tab
5. In the REST tab enter the details for the Process API to start flow URL -http://:/BPMREST/service/runtime/process//start HTTP Type - POST Header - Application/json Content Type - application/json Authentication - Basic
6. Click on Open Mapping Parameter to map the input as given below.
7. Click on 'Done' once completed.
Now the user can deploy the Microflow and call this microflow to start your process.
Get Task list of a Process from Microflow Once a process is started, if there is a human task to be completed, user needs to retrieve the taskID for the task to claim that task. In this section we will show how to retrieve a task using your Microflow.
1. Add a Web Service Node to your Microflow & click on the Web Service Node to open Configuration Panel
2. Open the Web Service Parameter tab
3. Select Web Service Type as REST
4. Click on the REST Tab
5. In the REST tab enter the details for the Process API to complete the task URL - http://:/BPMREST/service/runtime/tasks//complete?user= HTTP Type - POST Header - Application/json Content Type - application/json Authentication - Basic
6. Click on Open Mapping Parameter to map the input and output as given below.
Output
7. Click on 'Done' once completed.
Complete a Process from Microflow Once a process is started, user needs to complete each task in the process. In this section we will show how to complete a task using your Microflow. Before you start you need the taskID of the instance which needs to be completed. 1. Add a Web Service Node to your Microflow & click on the Web Service Node to open Configuration Panel 2. Open the Web Service Parameter tab 3. Select Web Service Type as REST 4. Click on the REST Tab
5. In the REST tab enter the details for the Process API to complete the task URL - http://:/BPMREST/service/runtime/tasks//complete?user= HTTP Type - POST Header - Application/json Content Type - application/json Authentication - Basic
6. Click on Open Mapping Parameter to map the input as given below.
7. Click on 'Done' once completed.
NOTE: A process can be integrated with a microflow, which can further be easily integrated to page and thus we can achieve the integration of a page with process. To know about integrating Page with Microflow please refer 6.3.6.2. Page Integration with Microflow.