I hope I am not sticking my head into the lion's mouth here, but here (
https://gist.github.com/BiggerNoise/9334673) is a link to a gist of some code in one of our apps.
Cases have Tasks and Activities. Activities are always associated with a case, and may be associated with a task.
In the controller, when assigning a case, one would type:
AssignCaseCommand.new(params).execute!
The command class implements the Command pattern (the pretty well established name for interactors) and is a Composite as well.
BTW - the same command that assigns the tasks of a case is also used to merely assign a task. And, if we're just recording an activity, we would just use the create activity command.
I think it would be insanity to try and capture the rules associated with re-assigning tasks in the controller. (I am pretty sure that you would agree.)
--Minor Edit for clarity--
Cases have Tasks and Activities. Activities are always associated with a case, and may be associated with a task.
In the controller, when assigning a case, one would type: AssignCaseCommand.new(params).execute!
The command class implements the Command pattern (the pretty well established name for interactors) and is a Composite as well.
BTW - the same command that assigns the tasks of a case is also used to merely assign a task. And, if we're just recording an activity, we would just use the create activity command.
I think it would be insanity to try and capture the rules associated with re-assigning tasks in the controller. (I am pretty sure that you would agree.)
--Minor Edit for clarity--