I have a situation where it is possible for a user to develop complex requirements using a UI. Specifically it deals with authorising users to perform certain work based on their qualifications.
For example the user must have;
- All of These: Qual1, Qual2, Qual3
- OR (One of These: (Qual4, Qual5) AND (All of These: Qual11, Qual12, Qual13))
- AND
- One or More of These: Qual6, Qual7, Qual8
- AND One of These: Qual9, Qual10
I've had a look at the Specification Pattern but I'm not sure if this is the best solution for the problem.
The requirements for each role are stored in the database using an Authorisation table linked to a Qualifications table and the user's training via a Training table linked to the Qualifications table.