Chapter 31. Integrating and automating the process 819
Example 31-5 shows a sample from our scenario.
Example 31-5 Updated Create method
public void RM_MaintenanceCreate(
com
.ibm
.www
.websphere
.crossworlds
._2002
.BOSchema
.RM_Maintenance
.RM_MaintenanceElement argBodyPart) {
// user code begin {method_content}
System.out.println("<<<< Message arrived for Create >>>>");
String resp;
try {
ProcessPortTypeProxy aProxy = new ProcessPortTypeProxy();
// user code begin {proxy_method_calls}
MaintenanceRequest rq = new MaintenanceRequest();
rq.setApartment(argBodyPart.getApartmentId());
rq.setTenant(argBodyPart.getTenantId());
rq.setDescription(argBodyPart.getProblemDescription());
rq.setMaintenanceId(argBodyPart.getId());
rq.setExpectedCompletion(argBodyPart.getExpectedCompletion());
resp = aProxy.InputOperation(rq);
System.out.println("Output: " + resp);
} catch (WSIFException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return;
// user code end
}
31.2.9 Deploying and testing the changes
You are ready to test the last piece of the solution. Follow these steps:
1. Stop the Test server.
2. Publish the changes to the server.
3. Start the server.
820 WebSphere Business Integration Adapters
4. Use rfhutil to write a message on the delivery queue. Use the sample file
RedContract_Delivery_Create in the Additional Materials Directory.
5. Inspect the console of the Test server. You should see lines similar to
Example 31-6.
Example 31-6 Output of the EJB on the console
SystemOut O <<<< Message arrived for Create >>>>
SystemOut O Output: process has been started successfully
6. Log on to the Process Web client, and verify your To Do list. There should be
a new entry.
7. Click the process link to inspect the details of the process instance, shown in
Figure 31-61. Notice the different data, which is this loaded from the file.
Figure 31-61 Details of a process instance

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.