Hi All, I have $subject issue while doing github to spreadsheet integration scenario. For that, I have tried the sample sequence as below [1]. After calling fist call mediator, I'm getting the response for the first call mediator. But the remain highlighted code segment is not executing. Is there any way to resolve this issue? or Is this an expected behavior?
But when I replace the for each mediator with iterate mediator There are no issues. [1] <?xml version="1.0" encoding="UTF-8"?> <sequence name="githubToSpreadsheet" xmlns="http://ws.apache.org/ns/synapse "> <payloadFactory media-type="json"> <format>{"repo" : ["repo_1"]}</format> </payloadFactory> <iterate continueParent="true" expression="//repo" id="repo_iterator" sequential="true" xmlns:ns=" http://org.apache.synapse/xsd"> <target> <sequence> <property expression="$body/repo" name="repository" scope="default" type="STRING"/> <github.init> <apiUrl>https://api.github.com</apiUrl> <accessToken>xxxxxxxxxxxxxxxxxxxxxxxx</accessToken> <mediaType>application/vnd.github+json</mediaType> </github.init> <github.listRepositoryIssues> <owner>Biruntha</owner> <repo>{$ctx:repository}</repo> </github.listRepositoryIssues> <foreach expression="//jsonArray/jsonElement" id="foreach_issue"> <sequence> <script language="js"><![CDATA[var repository = mc.getProperty('repository');]]></script> </sequence> </foreach> <call> <endpoint> <http method="GET" uri-template=" https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=ya29.Glu_BNInVSEO-bM3sJaYoN8m-k6w91j_WKg8mKraTu3E6_AKvbQmzJFMVDZ9q6HsfYDjT2enY5jjEy8p3ce9UJFwk7uhduKB8imoAi725i27toW0mwRs_LevZUvR "/> </endpoint> </call> <log level="custom"> <property name="First call mediator" value="After First Call mediator"/> </log> <header expression="fn:concat('Bearer ', 'ya29.Glu_BNInVSEO-bM3sJaYoN8m-k6w91j_WKg8mKraTu3E6_AKvbQmzJFMVDZ9q6HsfYDjT2enY5jjEy8p3ce9UJFwk7uhduKB8imoAi725i27toW0mwRs_LevZUvR')" name="Authorization" scope="transport"/> <payloadFactory media-type="json"> <format> {"values":[['repo_2','1st issue for repo_2']]} </format> </payloadFactory> <call> <endpoint> <http method="POST" uri-template=" https://sheets.googleapis.com/v4/spreadsheets/14PJALKcIXLr75rJWXlHhVjOt7z0Nby7AvcKXJGhMN2s/values/Scenario!A1:append?valueInputOption=RAW "/> </endpoint> </call> <log level="custom"> <property name="Second call mediator" value="After Second Call mediator"/> </log> </sequence> </target> </iterate> </sequence> Thanks, -- Biruntha Software Engineer WSO2 Email: [email protected] LinkedIn: https://lk.linkedin.com/in/biruntha Mobile : +94773718986
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
