Information Technology Reference
In-Depth Information
The User/Group callback
The Human task component will assign tasks to different groups and users depending on
the potential users, groups, and administrators defined for each task. Those groups and
users need to be defined within some specific security context. In order to provide such un-
derstanding to the Human task component regardless of the way your domain validates
users and groups, the API provides a UserGroupCallback interface. The User/Group
callback is a component in jBPM6 to abstract the way your company stores and accesses
your business users. This will allow us to write our process definition's human tasks by
already assigning specific user and group IDs, knowing that later on the end user UIs will
be able to map the logged-in user's ID to obtain all the tasks assigned to him or her and his
or her groups. The User/Group callback is an interface that defines the following three
methods:
public interface UserGroupCallback {
boolean existsUser(String userId);
boolean existsGroup(String groupId);
List<String> getGroupsForUser(String userId, List<String>
groupIds,List<String> allExistingGroupIds);
}
With this simple interface, the Human task component can easily understand how to man-
age user assignment for all different tasks. We'll learn more about the different implementa-
tions of the User/Group callback (and how to plug them in) in Chapter 6 , Human Interac-
tions .
Search WWH ::




Custom Search