MAIN arrow Samples-5.1 arrow SendReceive JMS Using ActiveMQ

SendReceive JMS Using ActiveMQ

Print E-mail

 

  zip sendreceivejmsactivemq 27/01/2008,23:27 3.86 Mb

 

Description:

This use case illustrates functionality of sending and receiving JMS message using Active MQ.
The process has been implemented by creating a wsdl that performs send & receive operation, and invoking this wsdl in intalio process

 

Use case dependencies:

JMSSchema.xsd: Schema used is "sendString" which is of "string" type.

 

Requirements:

1. Intalio|BPMS Server-5.1.1
2. Intalio|BPMS Designer-5.1.1
3. Active MQ 4.1.0-incubator.jar file
4. Axis2 version 1.3

 

Configurations:

  1. Download Active MQ 4.1.0 Binary version for windows from below given link http://activemq.apache.org/activemq-410-release.html.
  2. Extract the zip file in any of the drive say C:\ drive.
  3. Copy"apache-activemq-4.1.0-incubator.jar" file given in the active mq folder and paste it in lib folder of axis2 1.1 folder.
  4. Again copy "apache-activemq-4.1.0-incubator.jar" file given in the active mq folder and paste it in lib folder given under intalio|BPMS server: \repository\com\intalio\bpms\axis2-services-geronimo-1.1\1.1.1\axis2-services-geronimo-1.1-1.1.1.war\WEB-INF\services\lib.
  5. Restart the server

 

Process Download & Import:

1. Download 'JMSUsingActiveMQ.zip'.
2. Go to File > Import...
3. Select 'Existing Projects into Workspace', in the wizard, click on Next >
4. Browse to select the downloaded archive file & Click to Finish.
5. Update project builders by right click on project; go to BPMS Designer Tools > Update BPMS Builders.

 

sendreceivejmsusingactivemq.jpg
*Please follow these below instructions to remake the process

 

Preconditions:

1. Make sure Intalio|BPMS Server is up and running fine.
2. For the first time, go to "File > New > select "Intalio|BPMS Business Process Project".
3. Give Project name as "JMSUsingActiveMQ", click to finish.

 

Steps to remake the process:

  1. Import wsdl file "JMSServiceWS.wsdl" from zip file attached, directly under "JMSUsingActiveMQ" project.
  2. Right click on the project; go to New > "Business Process Diagram".
  3. Provide File name as "JMSUsingActiveMQ", and click to finish.
  4. A pool with a task is available in BPMN Editor Pane, name default pool as 'Client' and task as 'send'.
  5. Right click on client pool and select "Set pool non executable".
  6. Add new pool by click on BPMN Editor (select "Add Pool" option from pop up menu) and name it as "SendReceiveJMS".
  7. Focus on send task in Client pool, drag the out going message icon from boundary and release mouse control onto SendReceiveJMS pool to select the option "Connect to a new Message Start Event".
  8. Focus on Message Start Event, drag sequence flow icon from boundary and select option to "Connect to a new Task", name the task as "invoke".
  9. Focus on invoke task, drag sequence flow icon from boundary and select option to "Connect to a new Message End Event".
  10. Drag the outgoing message icon from Message End Event and connect to "send" task in the Client Pool.
  11. Repeat step 6 & 5, but name the pool as "JMSUsingActiveMQ".
  12. Drag and drop "Send" operation onto JMSUsingActiveMQ pool (Go to Process Explorer > JMSServiceWS.wsdl > JMSServiceWS > JMSServiceWSSOAP11port_http).
  13. Focus on invoke task in SendReceiveJMS pool, drag the outgoing message icon from "invoke" task and connect to "Send" task in SendReceiveJMS pool, similarly create connection in vice versa direction.
  14. Import schema files from zip file into the project (You can also create your own schema from File > New > Other > XML > XML Schema).
  15. Drag and drop JMSSchema.xsd > tns:sendString schema node on to incoming message flow from "send" task to message start event.
  16. A message "Set schema element 'sendString' as the content of the message" will prompt you, click on it.

 

Defining Outgoing Mapping:

  1. Make sure Mapper view is visible (go to Windows > Show View > Mapper).
  2. In the process model select "invoke" task.
  3. Click on "$thisEventStartMessageRequest.body" node in left side of mapper and then click on "$ns0SendRequestMsgt.part1" node in right side of mapper which will make an association.
  4. Select Message End Event in process model.
  5. Click on "$ns0SendResponseMsg.part1" node in left side of mapper and then click on "$thisEventStartMessageResponse.body" node in right side of mapper which will make an association.
  6. Save the process model.
  7. Now your process is fully implemented to and is valid to deploy and execute within Intalio|BPMS Server.

 

Process Deployment & Execution:

  1. Click on Deploy Project to Intalio|BPMS Server button in tool bar.
  2. Make sure you select all runtime files while exporting to Intalio|BPMS Server.
  3. Click on Finish button.
  4. Open a web browser, provide url as: http://localhost:8080/bpms-console which takes to login screen for bpms-console.
  5. Login with the following credentials:
    username: 'admin' (without quotes).
    password: 'changeit' (without quotes).
  6. In the processes list you should see "JMSUsingActiveMQ:SendReceiveJMS" process with a package name "JMSUsingActiveMQ", select it and click to Start.
  7. This should generate a form with an input field to map input data.
  8. Type Intalio in sendString field, then click on Submit button.
  9. This will replace the page with an output like EventStartMessageResponse: Intalio.
  10. Similarly, you can obtain results for other values.

 

Work Scenario in the Axis 2:

(To upload "JMSServiceWS.aar" in the Axis2)

  1. Make sure Intalio-bpms server is already started.
  2. Open a web browser, provide url as:http://localhost:8080/axis2/., that takes to login screen for axis2.
  3. Click on the "Administration" link.
  4. Login with the following credentials:
    username: 'admin' (without quotes) password: 'axis2' (without quotes).
  5. Click on the link to "Upload Service".
  6. Browse to location of "JMSServiceWS.aar" to "Upload a AxisService Archive File " page.
  7. Now click on Available Services link and refresh the webpage
  8. Verify that "JMSServiceWS" is present there.
  9. Click on the "JMSServiceWS" it displays respective wsdl file.
    Note: This wsdl displays users Ip address in place of localhost in soap address location.you need to save this wsdl file on your system and you need to use this wsdl in place of the existing wsdl.

 

Last Updated ( Feb 04 2008 )
  < Prev Next >