Database Reference
In-Depth Information
Prevention measures are more important here than just getting the possible resolutions; we
should have redundant EP storage implementation as we mentioned it in the rules: DB-
and File-based. ExecutionLookupService should encapsulate these two ap-
proaches.
Finally, the EP execution could fail because of error(s) occurred during the execution in
the main tasks loop. This is the place where the first table in the chapter will be exceed-
ingly handy. Most importantly, not only primitive suggestions will be returned, but also
the entire Message payload after the error-compensation process, instantiated by ErM.
Thus, for keeping SB truly generic, two main blocks must be implemented for the main
loop scope:
• The invocation of ErM with the entire payload and descriptive SBFault from
the Catch handler (see the next figure, part 1)
• Updating the MTR object and processing flags in the message header after receiv-
ing the response and updating the payload (see the next figure, part 2)
Providing a list of possible combinations in the second part can be extremely long, as you
can see from the following figure; therefore, please consider only some of the logical out-
comes:
• When the RETRY resolution is returned, we should:
◦ Increment the loop counter
◦ Check the new payload received from EH and update the current task's
payload accordingly
• When CONTINUE is suggested, we should check the following:
◦ Are we continuing with ROLLBACK (this is an agnostic composition con-
troller used everywhere) or a regular task?
◦ Is it the last task in a loop, and do we have to summarize all executions
(such as calculate orders and grand totals)?
• When CANCEL is received:
◦ Stop execution
Certainly, we should have other resolution options such has ROLLBACK ,
ROLLBACK_FAILED , and ROLLBACK_DONE . If we are in the first task in the loop, then
we probably do not need to perform any rollback. One really important thing to under-
stand here is that we cannot put any error-specific execution logic into our agnostic com-
position controller; it will just break the whole idea. This big case logic in the second part
of the following figure is only setting the flags and MTR/MH assignments.
Search WWH ::




Custom Search