Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better documentation with sample for Sequence BE #3448

Open
dushansachinda opened this issue Dec 11, 2024 · 1 comment
Open

Provide better documentation with sample for Sequence BE #3448

dushansachinda opened this issue Dec 11, 2024 · 1 comment

Comments

@dushansachinda
Copy link

dushansachinda commented Dec 11, 2024

Current Limitation

$subject. For someone new, it may be unclear what this is all about. Therefore, it’s recommended to provide scenario based samples along with clear documentation outlining the pros, cons, and limitations.

https://apim.docs.wso2.com/en/latest/tutorials/create-and-publish-a-sequencebackend-api/

Suggested Improvement

Document improvement with scenario

Version

No response

@dushansachinda
Copy link
Author

I've also created a BE sequence as follows engaged to the API, but it failed with

[2024-12-11 11:58:39,525] WARN - Axis2Sender Trying to send a response to an already responded client request - Rest API Context : /seqbescenario/1.0.0
[2024-12-11 11:58:43,491] INFO - LogMediator {api:seqBEScenario:v1.0.0} To: /seqbescenario/1.0.0, MessageID: urn:uuid:d343c100-6f43-4215-90fa-b9ec9246ef5a, correlation_id: d343c100-6f43-4215-90fa-b9ec9246ef5a, Direction: request, Start = Aggregate API Calls Sequence Started, Envelope: <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">soapenv:Body/</soapenv:Envelope>
[2024-12-11 11:58:43,493] INFO - LogMediator {api:seqBEScenario:v1.0.0} To: /seqbescenario/1.0.0, MessageID: urn:uuid:d343c100-6f43-4215-90fa-b9ec9246ef5a, correlation_id: d343c100-6f43-4215-90fa-b9ec9246ef5a, Direction: request, Start = Aggregate API Calls Sequence Started #1, Envelope: <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">soapenv:Body/</soapenv:Envelope>
[2024-12-11 11:58:43,676] ERROR - ContinuationStackManager Sequence : sequenceBEsample not found
[2024-12-11 11:58:43,680] INFO - LogMediator {api:seqBEScenario:v1.0.0} STATUS = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Sequence : sequenceBEsample not found
[2024-12-11 11:58:43,680] ERROR - ContinuationStackManager Sequence : sequenceBEsample not found
[2024-12-11 11:58:43,681] INFO - LogMediator {api:seqBEScenario:v1.0.0} STATUS = Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE = Sequence : sequenceBEsample not found
[2024-12-11 11:58:43,686] WARN - Axis2Sender Trying to send a response to an already responded client request - Rest API Context : /seqbescenario/1.0.0
[2024-12-11 11:58:43,687] WARN - Axis2Sender Trying to send a response to an already responded client request - Rest API Context : /seqbescenario/1.0.0

<sequence xmlns="http://ws.apache.org/ns/synapse" name="sequenceBEsample">
     <log level="full">
                <property name="Start" value="Aggregate API Calls Sequence Started" />
            </log>

            <clone continueParent="true" id="externalServiceClone">
                <target>
                    <sequence>
                        <call>
                            <endpoint>
                                <http method="GET"
                                    uri-template="https://run.mocky.io/v3/e29a71fb-0dbc-48bf-b620-450c048cd5a0" />
                            </endpoint>
                        </call>
                    </sequence>
                </target>
                <target>
                    <sequence>
                        <call>
                            <endpoint>
                                <http method="GET"
                                    uri-template="https://run.mocky.io/v3/234fecd6-9e6e-43c0-8e5a-a7516b218be7" />
                            </endpoint>
                        </call>
                    </sequence>
                </target>
            </clone>

            <log level="full">
                <property name="Start" value="Aggregate API Calls Sequence Started #1" />
            </log>
            <aggregate id="externalServiceClone">
                  <completeCondition>
                    <messageCount max="-1" min="-1" />
                </completeCondition>
                <onComplete aggregateElementType="root" expression="json-eval($.)">
                    <log level="full">
                        <property name="Start" value="responding API Calls Sequence Started #2" />
                    </log>
                    <respond />
                </onComplete>
            </aggregate>
</sequence>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants