Book Image

Mastering jBPM6

By : Simone Fiorini, Arun V Gopalakrishnan
Book Image

Mastering jBPM6

By: Simone Fiorini, Arun V Gopalakrishnan

Overview of this book

Table of Contents (18 chapters)
Mastering jBPM6
About the Authors
About the Reviewers

Human Task service

We introduced the human tasks in the previous chapter; we described the human task state transitions, task rule assignments, and task operations performed by the stakeholders.

You can get the org.kie.api.task.TaskService task service from RuntimeEngine (the getTaskService() method), which is a wrapper for the service; the task service is created and wrapped into RuntimeEngine (and the underlying session) by RuntimeManager, which uses TakServiceFactory:

InternalTaskService internalTaskService = (InternalTaskService) taskServiceFactory.newTaskService();

The factory used to instantiate TaskService is as follows:

  • LocalTaskServiceFactory: To be used in non-CDI environments

The factory configures the task service with the following references:

  • EntityManagerFactory instance (taken from RuntimeEnvironment).

  • UserGroupCallback (taken from RuntimeEnvironment). If no custom UserGroupCallback implementation is provided, a default MvelUserGroupCallbackImpl is used; this loads the UserGroupsAssignmentsOne...