Trying to find some examples on the intertubes. I am thinking of state or strategy pattern but if anyone has any war stories, examples or resources that they could point me to it would be appreciated.
I don’t/can’t use windows workflow.
My example is that i have a complex wizard that changes the state of the process based on what user is doing and by who the user is.
For example:
- Cancelled
- Requested by user
- Request by manager
- Confirmed
- Refereed
- Administrator Received
- Administrator Confirmed
- Administrator Cancelled
Cheers John
How about the State pattern (wikipedia link)?
As you can see, the pattern does fit exactly though.
Chain of Responsibility might be also be relevant if there’s security concerns. If the wikipedia article makes no sense then this book has a good examples of both. Another is the Command pattern for wizards. None of them fit perfectly but they give you some good ideas to start with.