mercredi 8 avril 2020

Closest Pattern for a flowchart type execution

Flowchart Example

What are the closest patterns I can implement for the example above type of execution flow? I tried doing Chain of Responsibility but, it's not as plug n play as I hoped. The issue comes with branching the outcome of a handler based on the decision. I tried to extend the pattern to have a "Positive" and "Negative" next handlers but then I'd want them to be of generic types so I can change handlers around when the client eventually wants revisions. I'm thinking of trying State pattern next. I also considered a rules engine, but from the short research I did, it seems like that approach is for a more sequential data pruning/validating scenarios.

Any advice would be appreciated. Thanks!

Aucun commentaire:

Enregistrer un commentaire