org.ow2.bonita.definition
Interface RoleMapper

All Known Implementing Classes:
InstanceInitiator

public interface RoleMapper

Role mapper is dedicated to manual activity (ie. activity with startMode=Manual, aka human task).
Implementing this interface allows to resolve the role by executing the searchMembers() method that returns the list of users matching with the role.
Within xpdl definition, Role Mapper element is specified within a role (ie. XPDL participant element with type=role) and this role is specified within the XPDL Performer element of a manual activity (ie. activity with startMode=Manual, aka human task).
There is two parameters to define a role mapper:

The searchMembers() method to be implemented is called when the execution enters into the node of the activity after the creation of the human task.
Candidates list of the task will be filled-in with returned set of users assuming that only these members of the list can get the task.
In other word, this task is returned by getTaskList() method (with state=READY) if executed by the users of the candidates list (being authenticated).

Author:
Marc Blachon, Guillaume Porcher, Charles Souillard, Miguel Valdes, Pierre Vigneras

Method Summary
 java.util.Set<java.lang.String> searchMembers(QueryAPIAccessor accessor, org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID, java.lang.String roleId)
          This method of the interface is intended to return an unsorted set of users that match the specified role.
 

Method Detail

searchMembers

java.util.Set<java.lang.String> searchMembers(QueryAPIAccessor accessor,
                                              org.ow2.bonita.facade.uuid.ProcessInstanceUUID instanceUUID,
                                              java.lang.String roleId)
                                              throws java.lang.Exception
This method of the interface is intended to return an unsorted set of users that match the specified role. good practice is to call an identity module (ie. user data base, Ldap server). Returned users become the candidates to execute the task.

Parameters:
accessor - The QueryAPIAccessor interface to access: QueryRuntimeAPI or QueryDefinitionAPI.
instanceUUID - Id of the instance.
roleId - Value of Id attribute of the Participant element (with role type) defined into the xpdl definition.
Returns:
The set of unordered list of user Id that match the role in the user base.
Throws:
java.lang.Exception - If an Exception has occurred.


Copyright © 2009 OW2 Consortium. All Rights Reserved.