Modeling question

I have multiple Departments that each have multiple Tasks associated with them. Each Task has an Approver associated with it. However, the Approver depends on the Department. Each Task also has a Processor associated with it. The Processor is not dependent on the Department so can have a one to one association with the Task. I'm trying to determine the simplest method of maintaining the Department configuration with it's Tasks, the associated Approver for each Task (based on Department) and Processor for each Task. Any suggestions would be appreciated.   Thanks, Tracy
1 answers


If I understand your scenario correctly, I think the following domain model would work for you:

A couple of notes:

  • I don't think you can have a 1:1 association for a Processor, because that would mean each Processor could only ever process one task
  • I assumed that Processors and Approvers were both Employees, if this is not the case, the domain model would have one additional entity for Processors

In order to constrain approvers based on department, you could have the following page:

And use Constrained By on the Approver reference selector to ensure you can only choose Approvers that are in the same Department as the Task is assigned to, see screen shot below:

Hope that helps,