Scenario: invoke two different endpoints in the same sequence.
The first invoke is only for logging purpose and its result has no impact
on the rest of the process.
https://docs.wso2.com/display/ESB481/Clone+Mediator
Here's the sample sequence. Here I have used Clone Mediator
Use the call mediator instead of send mediator in first target, if you do not
expect any response from the endpoint it's good to set the
OUT_ONLY property before the call mediator.
https://docs.wso2.com/display/ESB481/Call+Mediator
https://docs.wso2.com/display/ESB481/Generic+Properties#GenericProperties-OUT_ONLY
If you use the Send mediator here, the outSequence will be invok for all the response coming into the ESB.
When the first time outSequence called it invokes logAccessEP endpoint and then logAccessEP returns a reponse to the ESB, then again ESB invokes outSequence and then logAccessEP endpoint .... like wise it goes as a loop.
https://docs.wso2.com/display/ESB481/Clone+Mediator
Here's the sample sequence. Here I have used Clone Mediator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<sequence name="sequence1"> | |
<clone> | |
<target> | |
<sequence> | |
<log level="custom"> | |
<property name="LOG_IN_TARGET1" value="target1 called ...."/> | |
</log> | |
<property name="OUT_ONLY" value="true" /> | |
<call> | |
<endpoint key="logAccessEP" /> | |
</call> | |
</sequence> | |
</target> | |
<target> | |
<sequence> | |
<log level="custom"> | |
<property name="LOG_IN_TARGET2" value="target2 called ...."/> | |
</log> | |
<send> | |
<endpoint> | |
<address uri="http://localhost:9000/services/SimpleStockQuoteService"/> | |
</endpoint> | |
</send> | |
</sequence> | |
</target> | |
</clone> | |
</sequence> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<property name="OUT_ONLY" value="true" /> | |
<call> | |
<endpoint key="logAccessEP" /> | |
</call> |
https://docs.wso2.com/display/ESB481/Generic+Properties#GenericProperties-OUT_ONLY
If you use the Send mediator here, the outSequence will be invok for all the response coming into the ESB.
When the first time outSequence called it invokes logAccessEP endpoint and then logAccessEP returns a reponse to the ESB, then again ESB invokes outSequence and then logAccessEP endpoint .... like wise it goes as a loop.
Comments