Integration of DBO Process and BC Gadgets
This document will explain you about linking the Custom Gadgets and DBO Process. Instead of using CAF portlets, user can use Custom gadgets to start the process and user can update the User Task with custom fields using Custom User Task Gadgets in Runtime Business Console.
A Running environment and a working DBO Process consisting of IS Doc and User Task. For example, below I have taken a simple process with a user task.
Now the above process can be triggered through IS Document by publishing and a business data will flow through the User Task and process will be completed by Accepting/Rejecting the Task.
Let’s Create a Custom Gadgets for both Publishing the IS Document/Triggering Process and for User Task.
For Triggering Process:
- For Publishing the IS Document, first need to be ready with IS Service which publishes the Documents. There is an in-build flow service for publish.
- Create a flow service, drag and drop the “pub.publish:publish”.
- Add the IS document in Input/Output.
- Make required pipeline connections and save.
- Create a new RestResource for POST.
- Create a new RAD for the RestResource.
Now Go to User Interfaces in the Solutions Tab and Create a “New Web Application”
Go to Designer->UI Development Perspective and Under Created New Web Application; create a New Business Console Gadget.(JobInterviewApplication)
Open view.xhtml page, drag and drop the RAD created in the previous steps and Save.
Now let’s create a Custom Gadget for User Task:
Create a “New Task Portlet Application” – (ApplicationStatus) under Task and create a new Task under the “ApplicationStatus” and Name it is “ApplicationAcceptance”.
Open the Created Task and go to Business Data Tab and add the required document which needs to be available in the User Task.
As we need to update the User Task Status, “ApplicationStatus” Text Field is added.
Open the created Task and go to Overview Tab.
- Under the User interfaces Click on ApplicationAcceptanceView->Default and Click on Update.
- Select “Add task business data fields to selected task UI page” and select the document which has a custom fields and which needs to be displayed in the User Task.
- Follow the same steps for “ApplicationAcceptanceStart”->Default and Save.
- Now Create a RestResource for updating the task with PUT and GET API’s.
- Under the PUT flow service invoke the UpdateTask flow Service and make the necessary pipeline connections and save.
- Create a restResource API for the flow service created.
- Create an empty Gadget, under view.xhtml drag and drop the restResource API created in previous step, save and Deploy to server.
Now you have 2 Gadgets ready -
- Publish Gadget – To Trigger the Process.
- User Task Instance Gadget - To Accept/Reject the Application.
Deploy both the Gadgets and Task to MWS/IS Servers. Sync All the required Documents, Upload the Dynamic Process.
Go to Business Console, Create an AppSpace (InterviewApplication) and add 1st Gadget to AppSpace. (JobInterviewApplication) and Add WorkStream Gadget to AppSpace and Save.
Under WorkStream Search for User Task, Click on Customize the Task Details Page. Remove all the Gadgets(For better view) or Add the created User Task Gadget and Save.
Enter all the required details in the JobInterviewApplication Gadget in Business Console and Click on Submit button.
Go to Process tab in the Business Console and Check for the Process Triggered.
Open the Created Process Instance and Complete the process by Accepting the Task through Custom User Task Gadget.
Check for the Completion of Process by refreshing the page.