Thursday 24 March 2016

Human Task Implementation using Synchronous BPEL


Human task provide the feature where human can interact with the business process to take business decisions.

For modelling the process containing the human task we need to do the following:

1.Create and modelling the human task definition using the Human Task component.
2.Generate the task form for displaying the human task during runtime in Oracle BPM Worklist Application.
3.Finally associate it with BPEL process

Use Case: Let's take a use case from Credit Card Validation System, where the Amount greater than or equal to 90000 requires the approval from the manager. If the Amount is less then 90000 then based on business rules created it will perform the appropriate actions.

Continuation from my previous post to visit please click here



1) Drag and drop Human Task Component



Give the name as CreditCardValidationHumantask and click OK



Now you can see the generated files as shown



2) Double click on the Human Task Component and go to General tab give Task Title as Credit Card Validation Human Task.



Select Outcomes as APPROVE and REJECT



3) Now go to the Data tab in that go to Add other parameter



Browse for the XSD as shown below







4) Next go to the tab Assignment click on edit and add user weblogic to it.









5) Now click on Auto-Generate Task Form inside Create Form which will automatically generates some ADF pages in separate project as shown.



Give project name as CreditCardValidationHumanTaskProject







6) Now join BPEL with Human Task Component.





7) Double click on BPEL and give the condition to perform Human Task or Business Rules



8) If Amount is greater than or equal to 90000 then human intervention is needed



9) Drag drop Human Task component and browse for the task definition which is already created i.e., CreditCardValidationHumantask











10) This clearly shows based on the condition i.e., if Amount > 90000 Human Intervention needs to be performed otherwise Business Rules are executed.







Delete the mapping from task:payload to client:process and do the mapping task:outcome to client:result







Keep only Approve and Reject condition and delete the otherwise condition.





That's it now we are ready to deploy the composite.
Right click on the project --> Deploy --> Deploy BusinessRulesDecisionTable



If Application Server is not configured select Deploy to SAR as Application Server is configured Selecting Deploy to Application Server.



Click Next



Check Deploy to specific composite revision & partition and select CreditCardValidationHumanTaskProject



Select LocalServer and click Next



Click Next....



Click Next....



Click Finish....



Test the composite with Amount >= 90000



We will get a fault and the task will be in running state unless and until it will be Approved or Rejected by login into BPM Worklist Application.




Login into BPM Worklist Application.


We can see in My Tasks Credit Card Validation Human Task which is highlighted below.



Double click on it and wait for few minutes to load the page.
Once we get the popup page we can see two options Approve and Reject.
We can perform anyone here click on Approve.



Once we performs the action the task will be deleted automatically.



Now we are still getting the fault waiting for response timed out as it is synchronous process but the task is in completed state.



Thank You!!!!


Happy Learning!!!!

No comments:

Post a Comment