Section 10.4. Testing the Example


10.4. Testing the Example

This section presents two test scenarios:

  • Test case 1: InsuranceClaim is started, the EvaluateClaim task is completed with an outcome of requiresAnalysis, the AnalyzeClaim task times out, and the EscalateClaim task is completed with an acceptance.

  • Test Case 2: InsuranceClaim is started and, after a short time, is killed.

10.4.1. Test Case 1: Accepted on Escalation

To 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 Dashboard


Clicking on InsuranceClaim brings up the initiation test form, as shown in Figure 10-12.

Figure 10-12. Process Initiate for InsuranceClaim


Enter 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 page


Click on the task to bring up the page shown in Figure 10-14.

Figure 10-14. EvaluateClaim Task page


In 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: Kill

The 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




    Essential Business Process Modeling
    Essential Business Process Modeling
    ISBN: 0596008430
    EAN: 2147483647
    Year: 2003
    Pages: 122
    Authors: Michael Havey

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net