10.4. Testing the ExampleThis section presents two test scenarios:
10.4.1. Test Case 1: Accepted on EscalationTo start, open the BPEL administrative console in a browser. The URL for the default, out-of-the-box domain is http://localhost:9700/BPELConsole/login.jsp. Log in using the password bpel. The first page to come up after login is the Dashboard, shown in Figure 10-11, which lists the currently deployed processes. If you do not see the InsuranceClaim and InsuranceClaimKiller processes, open BPEL Designer and build and deploy each of them by selecting BPEL Build and Deploy BPEL Project. Figure 10-11. Oracle BPEL Console DashboardClicking on InsuranceClaim brings up the initiation test form, as shown in Figure 10-12. Figure 10-12. Process Initiate for InsuranceClaimEnter the data shown for id and data, and click Post XML Message to start the process. Within a moment of initiation, the EvaluateClaim task is assigned to an agent. To see the task, navigate to the task list page at http://localhost:9700/BPELConsole/default/tasks.jsp, shown in Figure 10-13. Figure 10-13. BPEL Console Task List pageClick on the task to bring up the page shown in Figure 10-14. Figure 10-14. EvaluateClaim Task pageIn the EvaluateClaim task page, enter in the Conclusion edit field the value requiresAnalysis, and click the Complete Task button. Check the task list page to confirm that the AnalyzeClaim is currently assigned to an adjuster, but leave that task alone. After a minute, the timer on AnalyzeClaim expires and a new escalation task, called EvaluateClaim and assigned to a manager, is created. Click on the escalation task, and on its task page, complete the task with the conclusion accepted. The InsuranceClaim process is complete. To see an audit trail or visual trace of the instance, select the instance from the Instances tab, and then select the Audit or Flow tabs from the instance page. 10.4.2. Test Case 2: KillThe kill test is simpler, requiring only two actions: the initiation of the InsuranceClaim process and, shortly thereafter, the initiation of the InsuranceClaimKiller process. Because both processes accept the same message type as input, the initiation test forms (reached from the Dashboard by clicking on the process link) are identical. The kill succeeds only if the id field used matches the id used to start the target InsuranceClaim instance. To confirm the kill, check the Dashboard's list of recently completed processes, as in Figure 10-15, which suggests, given the proximity of the Last Modified times, that instance 9 of InsuranceClaimKiller killed instance 7 of InsuranceClaim. Figure 10-15. Kill confirmation: 9 killed 7 |