A Task can be assigned to Authorites using Assignement Roles.
A Task can be assigned to Authorities using the following roles:
ASSIGNEE: A single Authority can be the current assignee of a task.SUBSTITUTE: Any number of Authorities can be the susbsitutes for the assignee.WATCHER: Any number of Authorities can be waching a task.TODO https://support.ecm4u.de/issues/7077
The YAML description of a Task Template can contain the optional section assignments. This section can contain three optional subsections:
assigneesubstitutewatcherEach subsection contains rules that are evaluated to get the Authorities the ask shall be assigned to with the given role. Example:
tasks:
Task1:
assignments:
assignee:
- staticMember: $sys_authority
substitute:
- or:
- personalSubstitute
- staticMember: ecm4u-team
For a Task with type Task1 this configuration contains rules for the assignee and a substitute.
sys_authority.ecm4u-team (a group).The assignments section is evaluated as part of a Waiting Action.
The following rules are implemented:
keepAssignee: If the Task is part of a Flow, the assignee of the previous Task in the Flow is kept. This rule can only be used for assignee.keepSubstitute: If the Task is part of a Flow, the substitutes of the previous Task in the Flow are kept. This rule can only be used for substitute.keepWatcher: If the Task is part of a Flow, the watchers of the previous Task in the Flow are kept. This rule can only be used for watcher.mdhInstanceData: A call to the SBCS MDH is made for an MDH entity instance. A specifict property of the instance is taken as the name of the Authority. This rule as three properties:
entity: the name of the MDH entityinstanceId: the ID of the MDH entity instanceinstanceProperty: the property of the instance that contains the Authority namepersonalSubstitute: The personal substitute of the assignee, if any. This rule can only be used for substitute.staticGroup: A group Authority. The value can reference a Task or Flow Property. The value of this rule can be a string or a list of strings.staticMember: A person Authority. The value can reference a Task or Flow Property. The value of this rule can be a string or a list of strings.Three logical rules can be used. These rules must contain subrules.
and: All subrules are evaluated and their results are combined into a set.oneof: All subrules are evaluated and their results are combined into a set. A random Authority is taken from this set.or: The subrules are evaluated in order. The first that returns at least one Authority is the result of the or rule. The remaining subrules are not evaluated.Logicial rules can be nested.
The YAML description of a Task Template can contain an optional section allowedAssignments. This section can contain the same rules as the assignments section. It is evaluated before assignments of a Task shall be set. For an Authorities to be assigned the Task, the Authority must be in the result of this evaluation for the intended assignment role.
If the allowedAssignments section is not specified, all assignments are allowed. If the allowedAssignments section does not contain a subsection for a role, all Authorities are allowed to be assigned the Task with this role.
A user can change assignments of a Task using a REST API. The intended assignment is verified against the result of the evaluation of the allowedAssignments section. If the intended assignment is not in the result of this evaluation, the change is denied.