784 WebSphere Business Integration Adapters
Figure 31-26 Monitoring a running process
10.Claim and complete the Staff1 activity to finish this process instance.
31.2 Developing a process start bean
In the overall scenario, it is the intention to instantiate the process when a new
maintenance event is generated and not manually, as we have done so far. To
achieve this, complete the following steps:
1. Generate an EJB that is called by an MDB upon the arrival of a message.
2. Generate the MDB for the incoming message from the adapter.
3. Generate a proxy for the process. The proxy is called by the EJB to
instantiate the process.
4. Adapt the process to facilitate automatic start-up.
Chapter 31. Integrating and automating the process 785
The flow is as follows:
Adapter puts message on queue.
MDB gets triggered upon the arrival of this message.
MDB calls EJB to handle message.
EJB calls process proxy.
Process proxy instantiates the process.
31.2.1 Generating the EJB that is called by an MDB
To generate the EJB:
1. Create an EJB project. Select File New Other.
2. Select EJB in left pane and EJB Project in right pane. Click Next.
Figure 31-27 Create EJB project
786 WebSphere Business Integration Adapters
3. Accept to create an EJB 2.0 project and click Next.
4. Provide a name for the EJB project, for example Process_StartEJB.
5. For the EAR project, click New. A new window appears. Name the EAR
project Process_StartEJBEAR. Click Finish (Figure 31-29 on page 787) to
return to Figure 31-28.
6. Click Finish in Figure 31-28 as well.
Figure 31-28 Create EJB project
Chapter 31. Integrating and automating the process 787
Figure 31-29 Create EAR project
7. WebSphere Studio Application Developer offers the option to switch
perspective. Click No.
The EJB that we want to build is based on the WSDL of the RM2 connector.
The connector sends a message, according to a certain operation in the
WSDL. The EJB needs to do something for each operation in the WSDL.
8. Right-click the WSDL RM2Connector.wsdl and select New Build from
9. Select EJB Service Skeleton and click Next.
788 WebSphere Business Integration Adapters
Figure 31-30 Create EJB based on existing WSDL
10.Select the option to create a new port and binding and click Next.

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.