mardi 10 novembre 2015

A design patter for switching, or cycling, between statuses

Is there a design pattern (like visitor, strategy, state etc.), or some other design principle, for helping to designing a good solution for simulating a flow in states for an entity, for example a Task entity.

A Task starts in New status, then progresses to BeingHandled status, then WaitingForApproval and then it can either be moved to Finished or NotApproved which is essentially back to BeingHandled with additional info, saying that it is back from WaitingForApproval.

So in general we have some general flow, and then we can some inner flow within it.

Thanks,

ashilon

Aucun commentaire:

Enregistrer un commentaire