Question

I have the following logic in my Proxy Service:

<proxy>
 <inSequence>
  <switch source="get-property('Action')">
            <case regex="getTaskTicket">
               <sequence key="CQProxy_GetTaskTicket"/>
            </case>
            <case regex="updateTaskTicket">
               <sequence key="CQProxy_UpdateTaskTicket"/>
            </case>
            ...
            <default/>
         </switch>
 </inSequence>
 <outSequence>
         <send/>
 </outSequence>
</proxy>

Now my CQProxy_UpdateTaskTicket calls another sequence:

<sequence name="CQProxy_UpdateTaskTicket">
  ... some logic goes here ...
  <sequence key="CQProxy_GetTicketDetails"/>

  ... here I need to wait for response from CQProxy_GetTicketDetails 
      before further processing ...
</sequence>

CQProxy_GetTicketDetails is used by various other sequences and in its turn defines OUT sequence to process its response:

<sequence name="CQProxy_GetTicketDetails">
   ... some logic ...
   <send receive="CQProxy_GetTicketDetails2">
      <endpoint key="CQ"/>
   </send>
</sequence>

The problem is that after CQProxy_UpdateTaskTicket sequence calls CQProxy_GetTicketDetails sub-sequence, it does not wait for response from that sub-seq but instead continues message processing. How is it possible to make CQProxy_UpdateTaskTicket wait for response before proceeding?

Was it helpful?

Solution

I was able to get around this issue by passing the response sequence name to the sub-sequence.

OTHER TIPS

You can use the Callout mediator for the blocking kind of operations within the WSO2 ESB. Instead of using the Send mediator (which is non-blocking) you can easily use callout mediator as mentioned below.

http://docs.wso2.org/wiki/display/ESB460/Callout+Mediator

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top