UntilSuccessful 组件轮询 http 端点直到满足条件

UntilSuccessful component to poll http endpoint till condition is met

正在轮询 http 端点,收到 JSON 响应,我希望一直轮询直到满足条件。 我试过 <until-successful failureExpression="#[json:status != 'COMPLETED']" maxRetries="5" secondsBetweenRetries="10" synchronous="true"> 但这给出了例外。

如果我的场景还有其他方法,请告诉我

将计算值分配给流变量,并提供评估相应流变量的条件。

<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>