There are certain situations where BPEL process component should be capable of receiving multiple response from Asynchronous BPEL process.
Multiple onmessage branch of Pick activity can be used to receive multiple responses from service.
In below example it us described how to use Pick activity to receive multiple response from service.
To demonstrate we will create a BPEL process which invokes a Asynchronous BPEL process that returns two different response based on operation type(input parameter).
Multiple onmessage branch of Pick activity can be used to receive multiple responses from service.
In below example it us described how to use Pick activity to receive multiple response from service.
To demonstrate we will create a BPEL process which invokes a Asynchronous BPEL process that returns two different response based on operation type(input parameter).
- If operation type is "name" it returns first name
- If operation type is "fullname" it returns first name and last name
To create this Asynchronous process click here.
Create a asynchronous BPEL process.
Open BPEL.xsd and modify the input elements.
Open the BPEL process ,add Partenerlink and add the wsdl of AsynchNameDemo BPEL process created here.
Add an Invoke activity and connect to this partenerlink.
Add an assign activity above this invoke activity and assign input parameter for the AsyncNameService process.
Now add an Pick activity below this Invoke activity. By default there will be a OnMessage branch. By clicking on the activity add one more OnMessage branch.
Click on first OnMessage,select your partnerlink "AsynchNameService" ,select the operation "processResponse" and add the variable too.
Similarly for the second OnMessage branch handle the response from processFullNameResponse.
Add and assign activity for each branch and assign the output variable the response received in respective onmessage response output variables.
Deploy the process and test.
No comments:
Post a Comment