< Previous | Next >

Deploy and test the modules on the server

You must deploy (also referred to as publish) your module to your test environment server before you can run and test your mediation.

In Hello World Part 1 you learn how to use the Server view and its Add and Remove Programs dialog to publish module applications to the server for the first time and how to use the Build Activities view to subsequently re-publish when required. In this sample however, you dive right into testing your applications, and just let the test client look after deploying and re-publishing your modules as required.

  1. To start testing your new module, but in such a way that all modules are managed in terms of server deployment, start the test from your integration solution. In the Business Integration view, right-click on your HelloWorldPart2 solution and select Test > Test Solution, as shown here:
    Picture of test solution menu
  2. The integration test client opens. Click on the Configurations tab at the bottom. The Configurations page appears, listing all the modules in your solution. Ensure only the HelloWorldProcess module is expanded, as shown here:
    Picture of configurations page
    The Configurations page is where you can configure your test session. That includes identifying which modules to include in the test, so that the test client ensures that are deployed and up-to-date on the server. Launching test from a solution pre-populates the modules in the solution.
  3. You can also configure your test session so that variable data is shown per event when a process is tested, which can be very helpful. Under the module’s Fine-Grained Traces category, select HelloWorldProcess. On the right you see all the variables in that selected process. Click Select All, as shown here:
    Picture showing variables in HelloWorldProcess
    Note: while you don’t explore it in this sample, another worthwhile capability here includes emulating components and imports, so you do not have to actually execute them when testing. This includes human task components where you can emulate different users claiming and completing them. Test integration client sessions can be saved for convenient reuse
  4. Return to the Events page. In the Detailed Properties section specify the module and component you want to test: HelloWorldProcess and HelloWorldProcess respectively. Also enter a value of male for the gender variable. It should look like this:
  5. Click the Continue button:
    Picture of Continue button
  6. The Deployment Location dialog appears:
    Picture of deployment location
    If you have multiple servers defined, you could specify per module where to deploy. Just click Finish to take the default server associations.
  7. The User Login dialog box opens. If you did not change the server’s default user ID and password at install time, then you can just click OK here. Else type what you specified at install time, and click OK.
  8. If required the server is started, and all modules in this test’s configuration are deployed or republished as necessary.
    Picture of test client start dialog
    Finally the test itself is run. You see events in the Events list showing execution flowing through the components in the Assembly Diagram and fine-grained events of the execution flowing through the activities in the business process. You should now see:
    Picture of events page
    At this point the execution is halted. The words in the bottom request event are (HelloWorldProcess -> HelloWorldTask:getName) which tells you that the component HelloWorldProcess has invoked the component HelloWorldTask via its getName operation. Since there is nothing after this, it seems the process is waiting. Indeed it is waiting … on you! There is a to-do task sitting somewhere waiting for someone to claim it and to complete it. You will now go find it....
  9. Find the Servers view in the bottom of the perspective, right-click on your server and select Launch > Business Process Choreographer Explorer as shown here:
    Picture of Launch menu showing Business Process Choreographer
  10. The Business Process Choreographer Explorer opens in the built-in Web browser. You are prompted for a user name and password. Enter the ID and password you have been using for administration, and for which you also specified as the only potential owner for the human task … by default, that will be admin and admin. Click Login.
  11. You see a list of to-do tasks for the user you signed in as.
    Picture of tasks in the Business Process Choreographer Explorer
    Remember, it is possible that multiple people are eligible to see the same to-do if they are part of the same “Potential Owner” list. However, once someone claims a to-do only they will see it. Click the check box in front of the HelloWorldTask task and click the Work on button above it to claim this task. The Task Message page appears where you are shown a form that displays the input parameter data, and prompts for entering the output parameter data:
    Picture of task message page
  12. In the Task Message page, for firstName enter phil and for lastName enter bar. Click the Complete button to complete your to-do task. Your to-do list reappears, but it is empty now.
  13. In the Business Process Choreographer, click logout at the top, and close the browser editor.
    Note: This Web user interface is the default one supplied for your convenience. There is also another supplied user interface for human tasks in the Business Space, which you can also launch from the Servers view. As well, you can create your own user interfaces for human tasks. This can be done by starting from scratch and just using the business process and human task APIs that IBM supplies, or you can kick-start your custom user interface using the module menu action Generate Human Task User Interface. For each task it will generate default forms if no customized forms are found. You can optionally create and customize the forms per task in the User Interface section of the human task editor.
  14. Back in the integration test client, the test run completes and you see the contents of the result output variable:
    Picture of events page showing contents of result variable
    In the Events list you see the fine-grained event flow for the business process as well as the request and response mediation flows from the Hello World Part 1 module.
  15. Click on the Reply fine-grained event to see the contents of the business process variables when execution was at that activity:
    Picture of Reply in events list
  16. Optional: You can continue testing. Select the little dropdown beside the first icon in the toolbar above the events list, and then select Invoke as shown here:
    Picture of Invoke in Events list
    A new invoke entry appears in the events list, and the original input data for that test shows in the Initial request parameters value editor. Change male to female and rerun the test, again by clicking the Continue button. You should see a result of “Hello Ms phil bar”.
  17. Close the integration test editor. You get a Save Test Trace dialog asking you to save your changes. Click No.
  18. Use File > Close All to close all open editors. When prompted to save your test client session, click No.





Feedback



(C) Copyright IBM Corporation 2007, 2008. All Rights Reserved.

< Previous | Next >