Hello,
I’m trying to grasp the concept of modelling a business process using CSLA.NET. As far as I understand the concept of business objects the golden rule is all about finding, centralizing and encapsulating behaviour.
But what happens when the business object is part of a process, or in other words, what if the business object is the entity moving through the business process? In this case it seems unnatural to place the behaviour of the process inside the object, as the process describes the workflow for an object and not the other way around.
Point 5 of Rocky's post on deciding to use (or not use) CSLA.NET (http://www.lhotka.net/Article.aspx?id=40048e03-6f9e-44a4-8322-80cb5de8303a) he wrote:
"An extension of a command object is a process object, that orchestrates a complex business process or workflow through the use of entity business objects."
The command object is quite obvious of course, but what about the process object? It doesn’t seem like a pattern is defined for this. At first I thought it matched the state pattern or chain of responsibility, but that doesn’t seem to be the case.
I also found a nice pattern called the sequential execution orchestrator pattern (http://codereview.stackexchange.com/questions/25435/sequential-execution-orchestrator-pattern) which might be useful. I still need to test this one however.
The use of course of WWF doesn’t seem like a real option. I have the feeling that is just a temporary thing, and that a more “raw” approach is much cleaner.
So I’m curious how you guys would approach this scenario? Are there best practices, patterns, or anything like that within the world of OO?
Thanks in advance for your response,
Best regards,
Peter