When a manual activity is executed, the workflow engine processes the allocation strategy defined in the metadata to retrieve the list of allocation targets for that task. If the allocation strategy is of type function, the workflow engine processes the input mappings defined for the associated allocation function and invokes it to retrieve the list of allocation targets. If the allocation strategy is of type rule, the workflow engine processes the mappings for the specified ruleset and calls the rules engine to run the ruleset to retrieve the list of allocation targets. If the allocation strategy is of type target, the allocation target is simply the one specified in the metadata and no further processing is required.
As described in the metadata for a workflow process (see Process Definition Metadata), a failure allocation strategy may be specified for a process. This strategy will be processed and used if the invocation of the allocation strategy associated with the task results in no allocation targets being returned.
The workflow engine then uses the curam.custom.workflow.workresolver property to determine the implementation of the function used to allocate tasks in the application. This function is then called by the workflow engine passing to it the list of allocation targets as determined by the allocation strategy and also details of the task to be allocated.
After the work resolver has been called for the task, the workflow engine makes a call to the method checkTaskAssignment in the curam.core.sl.impl.TaskAssignmentChecker class. This function will check the assignment status of the task (i.e. to ensure that it has been assigned to at least one user or organizational object (organization unit, position or job) or to a work queue). If the task has not been assigned, the application property curam.workflow.defaultworkqueue is examined to see what has been specified as the default work queue for workflow. The task is then assigned to that work queue.
If the task has been assigned to one user and only one user after the work has been resolved, the system checks the value of the application property curam.workflow.automaticallyaddtasktousertasks. This flag controls whether the system will automatically add the specified task being processed to the list of that user's tasks to allow them to work on it. The default value for the property is NO but if it has been specified as YES, then the system will automatically add that task to the user's My Tasks list in their Inbox to allow them to work on it.