org.ow2.bonita.definition
Interface PerformerAssign

All Known Implementing Classes:
VariablePerformerAssign

public interface PerformerAssign

Performer assignment is dedicated to manual activity (ie. activity with startMode=Manual, aka human task).
Implementing this interface allows to assign the activity to a user of a group.
Within xpdl definition, the performer assignment feature is specified within external attributes of the Activity element.
There is two parameters to define a performer assignment:

The selectUser() method to be implemented is called when the execution enters into the node of the activity after the creation of the human task and after the execution of the role mapper if there is one.

This task will be assign to the returned user and only this user can get the task.
In other word, this task is returned by getTaskList() method (with state=READY) only if executed by the assigned user (being authenticated).


Method Summary
 java.lang.String selectUser(QueryAPIAccessor accessor, org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.ActivityBody> activityInstance, java.util.Set<java.lang.String> candidates)
          Selecting one user from the candidates list is the good practice.
 

Method Detail

selectUser

java.lang.String selectUser(QueryAPIAccessor accessor,
                            org.ow2.bonita.facade.runtime.ActivityInstance<org.ow2.bonita.facade.runtime.ActivityBody> activityInstance,
                            java.util.Set<java.lang.String> candidates)
                            throws java.lang.Exception
Selecting one user from the candidates list is the good practice. Candidates list results from the execution of a role mapper.

Parameters:
accessor - The QueryAPIAccessor interface to access: QueryRuntimeAPI or QueryDefinitionAPI.
activityInstance - the activity.
candidates - The unordered set of user uuid that are candidate to start the task.
Returns:
The user Id that can start the task.
Throws:
java.lang.Exception - If an Exception has occurred.


Copyright © 2009 OW2 Consortium. All Rights Reserved.