Author |
Message
|
prasadpav |
Posted: Tue May 03, 2005 1:32 am Post subject: Question of Process Choreographer |
|
|
 Centurion
Joined: 03 Oct 2004 Posts: 142
|
Hi,
I'm developing a BPEL process which invokes message broker flows and waits for the response message. I think this is how i must be developing BPEL process to call message broker flows. Create java classes (which uses JMS for message put & message get - put on broker flow inputQ and get from broker flow response queue). And create a java service using these java classes. Use this Java service as a partner link in the BPEL process. Is this correct way of doing? or is there any better method? Also I'm not quite sure how correlation works in case of external interfaces like this. Is there any document which explains how I need to manipulate the headers in broker flows in order for response message to reach correct instance of BPEL flow?
Any thoughts or suggestions are greatly appreciated.
Regards,
Prasad |
|
Back to top |
|
 |
JLRowe |
Posted: Tue May 03, 2005 4:09 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
You can invoke the WBIMB flow directly as a JMS service, no need for a java class.
For correlation in BPEL, you need to define a correlation set. You can select any elements from the request and reply messages you invoke the service with that provide a unique correlation between the request and the response. Of course, the broker flow has to preserve these elements in the reply message so they can be correlated against the original request.
The request and the response messages can be different, but the elements used in the correlation must be the same type.
See this for a clearer explanation:
http://www-106.ibm.com/developerworks/webservices/library/ws-bpelcol6/ |
|
Back to top |
|
 |
prasadpav |
Posted: Wed May 04, 2005 1:19 am Post subject: |
|
|
 Centurion
Joined: 03 Oct 2004 Posts: 142
|
Thanks for your response. Regarding implementing broker flows as a JMS service, could you please elaborate on that? The whole scenario is like this BPEL gets a jms message as input, then in between the whole BPEL process, i must call broker flows and get response, once I get the response, BPEL must send response to the original caller.
Lets take an example, if my message broker flow is reading from READQ and the response flow replies to REPLYFROMBROKERQ. Now my BPEL flow must have a JMS service as a partner link which will do Message Write (to jms/brokerinputq --> READQ) and message read from (jms/brokeroutputq -->REPLYFROMBROKERQ). I'm little confused about invoke activities being talked to whom inorder to write a message. Or is it just in Java snippet i have to use standard JMS calls to write and read? Thanks. |
|
Back to top |
|
 |
JLRowe |
Posted: Wed May 04, 2005 2:08 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
You can call a flow in 2 ways:
* You can use a 2 way invoke with a request and a reply message, then WSIF handles the correlation between the request and the reply via the JMSCorrelationID. Look at the JMS sample at the WSIF site for an example of this:
http://ws.apache.org/wsif/wsif_samples/index.html
* You can use a one way invoke activity and then a further receive acttivity to pick up the reply. In this case you have to handle the correlation yourself using elements within the message and a correlation set.
So, to summarise, the first method uses WSIF to handle the correlation, it does this at the transport level using the JMSCorrelationID. The second method does it at the higher BPEL level using data within the message to correlate the request and the response together. |
|
Back to top |
|
 |
prasadpav |
Posted: Wed May 04, 2005 3:47 am Post subject: |
|
|
 Centurion
Joined: 03 Oct 2004 Posts: 142
|
Solution 1: The sample example explains how to invoke applications developed using JMS, but message broker flows are not implemented using JMS. They are directly reading and writing off from MQ Series message queues.
Solution 2: Agreed about the manual correlation checking. But still not quite sure about one way request message going to broker flow.
As per my understanding, some component either Java snippet in Process choreographer or the service which is being called by BPEL, must do a JMS-PUT of the message (This is because broker flows are not implemented using JMS). Trying to understand what this component would be.....
Regards,
Prasad |
|
Back to top |
|
 |
JLRowe |
Posted: Wed May 04, 2005 5:52 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
You can pick up JMS messages in WBIMB, a JMS message is simply wrapped up with an RFH2 header. I believe the JMSCorrelationID is mapped to the MQ native CorrelationID, see the MQ doc on using Java for full info on JMS with MQ.
Although WBIMB uses native MQ (not JMS) to access queues, it is capable of parsing/creating JMS messages. A JMS message is just like a normal MQ message, it just has a specific format which is well documented.
You can aid your understanding by writing a test flow that does a trace on the message to see the structure of the JMS message that WPC produces. |
|
Back to top |
|
 |
JLRowe |
Posted: Fri May 06, 2005 9:37 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
|
Back to top |
|
 |
|