2. Until Successful With Mule ESB
Scope is basicallyknown as a wrappers.Untilsuccessful scopeprocess the messageuntilthe
process succeeds. By default, untilsuccessful scoperuns asynchronouslybut you can always
configureas synchronous.For example,If parent flow is callingchild flow in untilsuccessful
scope, the mainflow will nothalt for child flow to complete,it will immediatelyregainscontrol
of thread.
There are various scenarios where you can use until unsuccessful scope.
• When you are callingweb service and there is always chancethat web service is not available
for few seconds or minutes.
• Subflow execution,performingvarious tasks and it keep re-executing until it succeeds.
• Duringdatabase call, it is always chancethe database server is not availablefor few seconds
or minutes due to high traffic.
• Anyother message processor, to perform complexactivities.
3. Until Successful With Mule ESB
Basic AttributesWith Until SuccessfulScope
• Object Store Ref is used to store events pending to process or reprocess.
• Max Retries is maximum number of times retries attempted.
• Milliseconds Between Retries is specify the minimum interval between two
attempts to process, in milliseconds.
• Failure Expression is specify an expression that, when it evaluated to true,
determines that the processing of one route was a failure. If no expression is
provided, only an exception is treated as a processing failure.
• Ack Expression specify expression that, when evaluated to true, determines the
synchronous response of until-successful.
• Dead LetterQueue Ref is the endpoint or message processor to which undeliverable
messages are sent after all retries have been executed unsuccessfully.
4. Until Successful With Mule ESB
Place the http listener in message source region and configure it.
Drag and drop http requestor in message processor region and wrap with until
successful scope.
Configure http requestor and provide rest web service url that you need to call.
Configure the until successful scope. Provide Max Retries, Milliseconds Between Retries
and Failure expression.
5. Until Successful With Mule ESB
Failure expression means till response code 200 is not received, message will retry for 5
times after time interval of 10 seconds. This is how you can use until successful scope in
mule flow.