views:

22

answers:

0

I am in the process of rewriting a data driven application in ASP.NET MVC and i am struggling to solve the following problem.


The application allows the user to create one or more documents are to be reviewed by a chain of different type of reviewers.

The reviews are done by users of different roles (Reviewer, Manager, FinanceApprover etc)

These reviews need not be sequential (FinanceApprover can start working on the review process without waiting for the approval of the "Manager" or "Reviewer").

Since the review process is not sequential and parellel reviews are possible, i designed a few "Task" (ReviewTask, ManagerTask, FinanceApproverTask etc) classes, one for each review type and defined the respective state transitions in each TASK class using the "StateLess" library.

What i am struggling is to figure out how to achieve this: When "Reviewer" has "Reviewed" the document, create a "ManagerTask" for "Manager X"

Should the "ReviewTask" have direct reference to "ManagerTask" or is there any better way of designing this?
Also, is there any sample application that demonstrates persistence of the "StateLess" states?

Any pointers regarding this is highly appreciated.