Process Orientation and Separation of Concerns

Suppose you have the following sequence of a loan process:

After pre-qualification has been made and if the value is greater than $1000, send an approvement task to a loan approver using email.

When implementing this process sequence, a couple of questions pops up related to Separation of Concerns (SoC):

- What if the approvement rule changes to "if the value is greater than $1000 and age is less then 21"?
- What if email is not enough for notification mechanism and we want to add SMS messages?
- What if loan approvers need help from other roles?

Putting to much information details into a process implementation will not result in a good SoC. Process implementations should only be modified when the process changes, not when rules or services are. Instead of implementing all details directly into a process engine, try to split your process sequence like this:

The When - "After pre-qualification has been made" goes into the process engine
The If - "if the value is greater than $1000" goes into the rules engine
The What - "send an approvment task" goes into the process engine
The Where - "a loan approver" goes into the mediator
The How - "using email" goes into the mediator

Good design often lead to less visability, and this is no exception. If the process says "using email" or "if the value is greater than $1000" then the implementation should say the same to reach good visability. But visability is not that important compared to using the right model (based on processes, rules, and services) and implementing it with a good SoC.

No comments: