UntilSuccessful component to poll http endpoint ti

2020-02-15 02:01发布

Polling http endpoint, receiving JSON response, I wish to keep polling till a condition is met. I have tried <until-successful failureExpression="#[json:status != 'COMPLETED']" maxRetries="5" secondsBetweenRetries="10" synchronous="true"> but this is giving exception.

Please also let me know if there is another method for my scenario

1条回答
Lonely孤独者°
2楼-- · 2020-02-15 02:47

assign the compute value to flow variable and provide condition evaluting the corresponding flow variable.

<until-successful failureExpression="#[flowVars['testRetryCondition'] != 'COMPLETED']" maxRetries="5" secondsBetweenRetries="10" synchronous="true"> <processor-chain doc:name="Processor Chain"> <http:........./> <set-variable variableName="testRetryCondition" value="#[json:status != 'COMPLETED']" doc:name="set-invocation-status"/> </processor-chain> </until-successful>

查看更多
登录 后发表回答