Type: New Feature
Affects Version/s: None
Fix Version/s: None
Component/s: BPM Engine
Inital working draft of support for "actor" assignments from business process definitions. All current code hard-codes task assignments in the Task code and ignores the /process-model/graph/nodes/node/actors/actor element. This code provides one working approach to supporting this originally intended but unimplemented functionality.
The basic approach here can be summarized as follows:
- Define a new service: ActorResolverService responsible for interpreting the simple Actor name declared in the process. An instance implementing this interface is given to the TaskService as part of its configuration.
- Modify the TaskService interface to add a method assignTaskToActors which accepts an Actor and recursively resolves all references to either a UserID or GroupID and creates tasks for each resolved entity.
An alternative to modifying the TaskService would be to force each concrete Task to handle the resolution and assignment itself. I have initially rejected this approach because it seems out of the scope of concern of the task to handle this resolution, especially when the time comes to implement instance-level fields as actors (such as "self" or "initiator").
Note that this patch removes the special actor "Self" from the Leave Application sample which is not yet implemented (and apparently not supported by the engine yet)