Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
Can you recommend a design pattern for dealing with workflows?
I am wondering how to represent a decision tree while also making it easy to maintain and each step should be unit-testable on its own.
I want to avoid a big if-else-block, but I am also unsure what design pattern to apply here.
Basically, there a bunch of yes-no-question (though some conditions may be more complex) that can be nested very deeply, and depending on a certain set of requirements we want to display different actions.
(The workflow is fixed, there is only 1 at at time yet it may change a lot over the next iterations until we figure out what our userbase wants.)
question
design pattern
workflow