MAIN arrow Samples-5.1 arrow ReceiveJMS Message

ReceiveJMS Message

Print E-mail

zip receivejmsmessage 12/02/2008,03:52 27.47 Kb

 

Description:

This use case illustrates functionality of receiving JMS message.
The process has been implemented by creating a wsdl that performs receive operation, and invoking this wsdl in Intalio process.
The WSDL file "ReceiveJMSContract.wsdl" is generated from "Web Logic 8.1" Application Server which consists "receiveJMSMessage" as its Operation name. The process accepts "StringQueueJNDI" and "StringHost" as input parameters and keep them in a Queue and displays the JMS messages already existing in weblogic server
In the Input parameters, 'StringQueueJNDI' specifies the JNDI name which is created in web logic console, 'String Host' specifies the name of the host ie "where the Web Logic Server is located".

 

Use case dependencies:

receivejms.xsd: Schema used is of "complex" type.


Requirements:

  1. Intalio|BPMS Server-5.1.1.
  2. Intalio|BPMS Designer-5.1.1.
  3. BEA-Web Logic 8.1 SP2

 

Process Download & Import:

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

receivejmsmessage.jpg

Web Logic Configurations:

  1. Make sure WebLogic Server is running successfully.

  2. Open a web browser, provide url as: http://localhost:7001/console, that takes you to WebLogic Server Administration Console page.

  3. Login with the following credentials:
    username: 'weblogic' (without quotes).
    password: 'weblogic' (without quotes).

  4. Expand "workshop > Services> JMS >Servers” in left pane and click on it.

  5. In right side panel, click on "Configure new JMS Server".

  6. In "General" tab, provide "Name" as "JMSTest" and click to "create".

  7. Select "Target" as "cgServer" under "Target and Deploy" tab and click to "Apply".
    Note: New JMSTest" will be created with "Destinations" and "Session Pools" as its sub nodes under "JMS > Servers" in left panel of console.

  8. Click on "Destinations" given under JMSTest" in the left panel.
    Note: In the right side, window refreshes and displays with configuration options.

  9. Click on "Configure a new JMS Queue".

  10. In "General" tab, provide Name as "New.JMS" and JNDI Name as "jws.test" respectively then click to "Create".
    Note: New JMS Queue name displays under "Destinations" in left panel.

  11. Click to Logout from console.


Work Scenario in WebLogic:

  1. Open WebLogic Workshop 8.1.

  2. Right click on "SamplesApp" under Application tab, select New >Project.

  3. Select "Web Service Project" and provide project name as "JMSReceiveProject" then click on “Create”.
    Note: New project with name "JMSReceiveProject" displays under "SamplesApp" which includes "WEB-INF" folder also.

  4. Right click on "JMSReceiveProject", go to New > select “Web Service”.

  5. Provide file name as "ReceiveJMS" and click to "Create".

  6. Instantly window with name as "ReceiveJMS" having two tabs "Design View" and "Source View" is available.

  7. Click on 'Source view' tab and paste the code from "ReceiveJMS.jws" file attached within the zip file into ReceiveJMS.jws being created by you.

  8. Repeat 4-7 steps, but provide file name as "ReceiveQueueJMS" and for the code please check for "ReceiveQueueJMS.jws" file attached within the zip file and paste this code into ReceiveQueueJMS.jws being created by you.

  9. Similarly repeat 4-7 but provide file name as "ResponseQueueJMS" and for the code please check for "ResponseQueueJMS.jws" file attached within the zip file and paste this code into ResponseQueueJMS.jws being created by you.

  10. Save the jws files.

  11. Right click on project 'JMSReceiveProject and click "Build JMSReceiveProject" to create the build.

  12. Right click on "ReceiveJMS.jws" and click to "Generate WSDL file".

  13. Open the generated "ReceiveJMSContract.wsdl" wsdl file.

  14. Go to File >Save As, save the WSDL file as "ReceiveJMSContract.wsdl" in any of your folder.

Please follow these below instructions to remake the process.

 

Preconditions:

  1. Make sure Intalio|BPMS Server is up and running fine.
  2. Make sure the Process Explorer pane does not contain any Intalio|BPMS Business Process Project with same name.

Steps to remake the process:

  1. Go to File > New > select "Intalio|BPMS Business Process Project".

  2. Give Project name as "ReceiveJMSMessage", click on Finish.

  3. Import wsdl file "ReceiveJMSContract.wsdl" from zip file attached, directly under "ReceiveJMSMessage" project.

  4. Right click on the project; go to New > select "Business Process Diagram".

  5. Provide diagram name as "ReceiveJMSMessage", and click to finish.

  6. A pool with a task is available in BPMN Editor Pane, name default pool as 'Client' and task as 'send'.

  7. Right click on client pool and select "Set pool non executable".

  8. Add new pool by click on BPMN Editor (select "Add Pool" option from pop up menu) and name it as "ReceiveJMSMessage".

  9. Focus on send task in Client pool, drag the out going message icon from boundary and release mouse control onto ReceiveJMSMessage pool to select the option "Connect to a new Message Start Event".

  10. 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".

  11. Focus on “invoke” task, drag sequence flow icon from boundary and select option to "Connect to a new Message End Event".

  12. Drag the outgoing message icon from Message End Event and connect to "send" task in the Client Pool.

  13. Repeat step 8 & 7, but name the pool as "ReceiveJMSMessageWSDL".

  14. Drag and drop "receiveJMSMessage" operation onto ReceiveJMSMessageWsdl pool (Go to Process Explorer > ReceiveJMSContract.wsdl > ReceiveJMS > ReceiveJMSSoap).

  15. Focus on invoke task in ReceiveJMSMessage pool, drag the outgoing message icon from "invoke" task and connect to "receiveJMSMessage" task in ReceiveJMSMessageWsdl pool, similarly create connection in vice versa direction.

  16. Import schema files from zip file into the project (You can also create your own schema from File > New > Other > XML > XML Schema).

  17. Drag and drop receivejms.xsd > tns:ReceiveQueueJMS schema node on to incoming message flow from "send" task to message start event.

  18. A message "Set schema element 'ReceiveQueueJMS' 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" > StringQueueJNDI node in left side of mapper and then click on "$opeReceiveJMSMessageRequest.parameters" > objQueueJMS[?] >StringQueueJNDI[?] node in right side of mapper which will make an association.

  4. Similarly form associations between other node, i.e. "StringHost".

  5. Select Message End Event in process model.

  6. Click on "$opeReceiveJMSMessageResponse.parameters" node in left side of mapper and then click on "$thisEventStartMessageResponse.body" node in right side of mapper which will make an association.

  7. Save the process model.

  8. Now your process is fully implemented which is ready 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 "Receive JMSMessage:Receive JMSMessage" process with a package name "ReceiveJMSMessage", select it and click to Start.

  7. This should generate a form with label "EventStartMessageRequest", two input fields to map two input data.

  8. Type 'jws.test' in StringQueueJNDI field and 'localhost' in StringHost field then click to Submit.

  9. This will replace the page with an output like :
    EventStartMessageResponse:
    receiveJMSMessageResult:
    ResponseQueueJMS:
    StringMessage: TextMessage[ID:P<290678.1182941628577.0>, hello jms]

Last Updated ( Feb 12 2008 )
  < Prev Next >