Labs SEI >

The following short tutorial demonstrates two additional SOA components: Human tasks and Business rules.
The screenshots are not current, so you may find discrepancies between them and your development software.

Table of Contents


User tasks

  1. Create a new **Asynchronous** BPEL process named HumanIntervention which receives a string as input.
  2. Drag a Human Task Component from the SOA Component Palette to the **composite** view.
  3. screenshot
  4. Name the human process as ApprovalRequest
  5. screenshot
  6. Double-click on the LeaveRequest task tab. This will open up the task definition form as a new tab within JDeveloper.
  7. screenshot
  8. Change to the Data Tab and create a string payload.
  9. screenshot
  10. Name the Parameter as Approval Reason.
  11. screenshot
  12. Select the assignment tab and change the stage name to approval by clicking on the edit button.
  13. screenshot
  14. Now choose *edit* participant and click the edit button.
  15. screenshot
  16. In the new participant window, add a new user.
  17. screenshot
  18. Choose the participant name clicking on the three points button.
  19. screenshot
  20. Change the Application Server to the localhost-wls connection. Do a search and choose the cdickens user. **Click** the select button.
  21. screenshot
  22. Close the task window to save the new task. (Or you can click the save all button).
  23. Connect the created BPEL process with the new user task.
  24. screenshot
  25. In the new BPEL process, drag a new user task shape to the bpel process.
  26. screenshot
  27. Open the user task component. Edit the Task Title to "Approval Request". Leave the initiator field blank. For the task parameter choose the result element of the input variable of the web service.
  28. screenshot
  29. Your BPEL process should now look like the following image. Deploy the composite to the server as in previous lessons. Correct any errors you may have deploying.
  30. screenshot
  31. Go to the composite.xml view and open again the user task. Click on the create form button and select auto-generate task form.
  32. screenshot
  33. Name the new project as ApprovalForm and click ok. (slower computer must wait some time before proceeding to the next step)
  34. As you can see, there is a HTML page representing a form for the request. To publish the form click Application->Deploy->ApprovalForm.
  35. screenshot
  36. Choose Deploy to Application Server->localhost-wls.
    You can leave the option to deploy to all instances in the domain (as there is only one). Finish the deploy form. Wait.
  37. In a browser go to: http://localhost:7001/em
    and test the new service as in previous lesson. Note that the instances created are still running with a conversation_id.
  38. Now open a new browser tab at: http://localhost:7001/integration/worklistapp.
    Login with cdickens:welcome1.
  39. screenshot
  40. Note the instances pending for authentication.
  41. screenshot
  42. Click on the instance and approve.
  43. screenshot
  44. Note where the errors occurred and correct them. Hint: Look at the assignments. Try to change the input to /task:task/task:systemAttributes/task:outcome.

Business rules

  1. Create a new **synchronous** BPEL process named AskVacation which receives an integer and outputs an integer.
  2. Drag a Business Rule component in the composite view.
  3. screenshot
  4. Create a business rule names AskVacationRules, which has has input the input variable of the webservices. The output should be the output of the webservice.
  5. screenshot
  6. Edit the create business rule by double clicking on the shape. Rename the rule and create a new rule.
  7. screenshot
  8. Create two new if-then rules as shown in the following image.
  9. screenshot
  10. In the composite view connect the new bpel process with the new business rule
  11. screenshot
  12. In the AskVacation.bpel drag the business rule.
  13. screenshot
  14. Name the rule as VacationRule. Fill the input and output facts. You must double click the Business Rules Fact to see them.
  15. screenshot
    screenshot
    screenshot
  16. Deploy and test the service.
  17. Later, try to use bucket sets and decision tables to easily change business rules.

References