814 WebSphere Business Integration Adapters
12.Click Load Class.
13.Enter the name of the proxy class and click Load.
Figure 31-55 Load the proxy class in the Test client
14.When the class is loaded and an instance is created, click Work with Object.
Figure 31-56 Add class instance to list of references
15.Expand the class references on the left to locate the main method of the
proxy class.
Chapter 31. Integrating and automating the process 815
16.Click Invoke.
Figure 31-57 Invoke the main method of the proxy class
17.No output is returned by the proxy. However, there are a few locations where
we can verify what happened. The quickest test is to look at the console and
verify if the print statement has happened or if the console is filled with
exceptions. Hopefully, you see the following:
SystemOut O Output: process has been started successfully
This message means that the instance was created successfully. Thus, we
should have an activity in our To Do list.
18.Log on to the Process Web Client and verify your To Do list.
816 WebSphere Business Integration Adapters
Figure 31-58 Activity in To Do list
19.Click the process link to verify the details.
Note: The user ID that has created the process is not db2admin this time.
Note also that the process output is available while the process instance is
still running.
Chapter 31. Integrating and automating the process 817
Figure 31-59 Details of process instance
20.Click Monitor to look at finished activities.
818 WebSphere Business Integration Adapters
Figure 31-60 Monitoring a process instance started by the proxy
31.2.8 Adapting the EJB
Now that the proxy is tested, you can make the final change. You need to copy
the data that is part of the JMS message from the adapter into the structure
MaintenanceRequest that is part of the process interface. Setting the contents of
this structure is something you did already in the proxy. So, you can copy that
code. You just need to parse the incoming message.
1. Open the Java class RM_MaintenanceAgentDeliveryBean.java, which is the
class that contains a method per supported verb of the business object
RM_Maintenance.
2. Copy the lines of code in the try-catch block in Figure 31-55 on page 814 to
the Create method.
3. Replace the constant values with the appropriate getters on the variable
argBodyPart.
4. Save the changes

Get WebSphere Business Integration Adapters: An Adapter Development and WebSphere Business Integration Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.