I am trying to call sequence from an API in wso2. Api I have written is below:
<resource methods="GET">
<inSequence>
<log level="custom">
<property name="Bashir bhhhh" value="Service"/>
</log>
<sequence key="checkseq"/>
<log level="custom">
<property name="Bashir bhhhh" value="Service Ends"/>
</log>
</inSequence>
</resource>
The Sequence I have written is mentioned below:
<sequence name="checkseq" trace="disable" xmlns="http://ws.apache.org/ns/synapse"/>
<log level="custom">
<property name="Seq" value="Working Starts"/>
</log>
<log level="custom">
<property name="Seq" value="Working Ends"/>
</log>
</sequence>
It is not giving me any errors or any problem, just not going into sequence, skipping it. Both logs above and below sequence are printing. Would be grateful if anyone can guide me with where am I doing wrong. Thank You
CodePudding user response:
There is an issue with your sequence definition. You have mistakenly added a self-closing (<sequence />
) tag for sequence.
Use the following updated sequence.
<sequence name="checkseq" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<log level="custom">
<property name="Seq" value="Working Starts"/>
</log>
<log level="custom">
<property name="Seq" value="Working Ends"/>
</log>
</sequence>