Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Accessing Axway Mobile Backend Service (MBS) from Axway's Integration Builder - Part 2 (assets)
{"id":28960,"name":"Approvals Monitor","userId":21107,"accountId":18281,"createdDate":"2019-08-21T14:11:46Z","steps":[{"id":206339,"onSuccess":[],"onFailure":[],"name":"consoleLog","type":"script","properties":{"body":"console.log(trigger);"}},{"id":206345,"onSuccess":[],"onFailure":[],"name":"consoleLogMBSApprovalsGetFailure","type":"script","properties":{"body":"console.log('MBS approvals get failure');"}},{"id":206342,"onSuccess":[],"onFailure":[],"name":"consoleLogMBSUserLoginFailure","type":"script","properties":{"body":"console.log('MBS user login failure');"}},{"id":206344,"onSuccess":[],"onFailure":["consoleLogMBSApprovalsGetFailure"],"name":"getMBSCustomObjectApprovals","type":"httpRequest","properties":{"url":"${steps.prepareGetApprovals.url}","method":"GET"}},{"id":206341,"onSuccess":["prepareGetApprovals"],"onFailure":["consoleLogMBSUserLoginFailure"],"name":"loginMBSUser","type":"httpRequest","properties":{"body":"${steps.prepareLoginMBSUser.body}","url":"${steps.prepareLoginMBSUser.url}","method":"POST"}},{"id":206343,"onSuccess":["getMBSCustomObjectApprovals"],"onFailure":[],"name":"prepareGetApprovals","type":"script","properties":{"body":"let url = 'https://api.cloud.appcelerator.com/v1/objects/approvals/query.json?pretty_json=true&count=true&key='+config.mbsAppKey+'&_session_id='+steps.loginMBSUser.response.body.session_id;\n\ndone({url:url});"}},{"id":206340,"onSuccess":["loginMBSUser"],"onFailure":[],"name":"prepareLoginMBSUser","type":"script","properties":{"body":"let url = 'https://api.cloud.appcelerator.com/v1/users/login.json?pretty_json=true&key='+config.mbsAppKey;\n\nlet body = {\n \"login\": config.mbsUsername,\n \"password\": config.mbsPassword\n}\n\ndone({url:url, body:body});"}}],"triggers":[{"id":25629,"onSuccess":["prepareLoginMBSUser"],"onFailure":[],"type":"scheduled","async":true,"name":"trigger","properties":{"cron":"${config.cron}"}}],"engine":"v3","active":true,"singleThreaded":false,"debugLoggingEnabled":true,"configuration":[{"id":52312,"key":"cron","name":"cron","type":"value","required":true},{"id":52313,"key":"mbsAppKey","name":"mbsAppKey","type":"value","required":true},{"id":52314,"key":"mbsPassword","name":"mbsPassword","type":"value","required":true},{"id":52315,"key":"mbsUsername","name":"mbsUsername","type":"value","required":true}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.