Monday, July 30, 2007

My new design pattern : skip step

SOA - Business Process Patterns:

Here is a pattern, that I never read about or came across. I would like to share with the programming world about "skip step" pattern. In this design pattern, one would write the application logic to use flags to skip certain steps in the use-case scenarios. Typically the need for "skip step" arises at each coarse-grained and down-stream dependent function-calls. In the skip-step pattern, one can store the flags as skip-flags outside the execution-environment. By changing these flags the application can be made to include/skip certain steps in the process flow. This design pattern has been extremely useful, in particular in EAI applications.

The advantages of "skip-step" pattern as occurs to me:

Assume a use-case that goes through a, b, and c steps. Here a, b and c steps interact with A, B and C external systems or database.

1) Skip a or b or c during the execution, if that step is not ready or not required anymore.
2) Step a is successful and step b failed. Next time you want to execute the same flow/order and want to skip a.