Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Axway Integration Builder - Variable Persistence (Assets)
{"id":29115,"name":"Variable Persistence Example ","userId":21107,"accountId":18281,"createdDate":"2019-08-27T21:18:24Z","steps":[{"id":208555,"onSuccess":["prepareGetFormulaInstanceMetadata"],"onFailure":[],"name":"consoleLog","type":"script","properties":{"body":"console.log(config.lastExecutionTime);"}},{"id":208560,"onSuccess":["prepareUpdateLastExecutionTime"],"onFailure":[],"name":"getFormulaInstanceMetaData","type":"request","properties":{"method":"GET","api":"${steps.prepareGetFormulaInstanceMetadata.url}"}},{"id":208559,"onSuccess":["getFormulaInstanceMetaData"],"onFailure":[],"name":"prepareGetFormulaInstanceMetadata","type":"script","properties":{"body":"let url = `/formulas/${info.formulaId}/instances/${info.formulaInstanceId}`;\n\ndone({url: url});"}},{"id":208561,"onSuccess":["updateLastTimeStamp"],"onFailure":[],"name":"prepareUpdateLastExecutionTime","type":"script","properties":{"body":"let formulaInstance = steps.getFormulaInstanceMetaData.response.body;\n\nformulaInstance.configuration.lastExecutionTime = Date.now();\n\ndone({body:formulaInstance});"}},{"id":208562,"onSuccess":[],"onFailure":[],"name":"updateLastTimeStamp","type":"request","properties":{"body":"${steps. prepareUpdateLastExecutionTime.body}","method":"PUT","api":"${steps.prepareGetFormulaInstanceMetadata.url}"}}],"triggers":[{"id":25763,"onSuccess":["consoleLog"],"onFailure":[],"type":"scheduled","async":true,"name":"trigger","properties":{"cron":"0 * * ? * *"}}],"engine":"v3","active":true,"singleThreaded":false,"debugLoggingEnabled":true,"configuration":[{"id":52678,"key":"lastExecutionTime","name":"lastExecutionTime","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.