|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JbpmTaskService
Service offering JPBM methods to create and end tasks independently from a process.
JbpmService
is called by this service to handle the task.
Nested Class Summary | |
---|---|
static class |
JbpmTaskService.TaskVariableName
Variable names added as markers on the created task |
Field Summary | |
---|---|
static String |
TASK_INSTANCE_EVENT_PROPERTIES_KEY
Property used to pass task in the notified events properties |
Method Summary | |
---|---|
void |
acceptTask(CoreSession coreSession,
NuxeoPrincipal principal,
TaskInstance task,
String comment)
Ends the task using event name JbpmEventNames.WORKFLOW_TASK_COMPLETED and marking the task as
validated. |
boolean |
canEndTask(NuxeoPrincipal principal,
TaskInstance task)
Returns true if user is an administrator, the initiator of the task, or an actor of the task. |
void |
createTask(CoreSession coreSession,
NuxeoPrincipal principal,
DocumentModel document,
String taskName,
List<String> prefixedActorIds,
boolean createOneTaskPerActor,
String directive,
String comment,
Date dueDate,
Map<String,Serializable> taskVariables)
Creates a task and starts it. |
void |
endTask(CoreSession coreSession,
NuxeoPrincipal principal,
TaskInstance task,
String comment,
String eventName,
boolean isValidated)
Ends the task |
void |
rejectTask(CoreSession coreSession,
NuxeoPrincipal principal,
TaskInstance task,
String comment)
Ends the task using event name JbpmEventNames.WORKFLOW_TASK_REJECTED and marking the task as
not validated. |
Field Detail |
---|
static final String TASK_INSTANCE_EVENT_PROPERTIES_KEY
Method Detail |
---|
void createTask(CoreSession coreSession, NuxeoPrincipal principal, DocumentModel document, String taskName, List<String> prefixedActorIds, boolean createOneTaskPerActor, String directive, String comment, Date dueDate, Map<String,Serializable> taskVariables) throws NuxeoJbpmException
JbpmEventNames.WORKFLOW_TASK_ASSIGNED
and
JbpmEventNames.WORKFLOW_TASK_ASSIGNED
, passing the task in the
event properties using key TASK_INSTANCE_EVENT_PROPERTIES_KEY
coreSession
- the session to use when notifyingprincipal
- the principal marked as initiator of the task and used
when notifying.document
- the document to attach to the task.taskName
- the task name.prefixedActorIds
- the list of actor ids, prefixed with 'user:' or
'group:'.createOneTaskPerActor
- if true, one task will be created per
actor, else a single task will be assigned to all actors.directive
- the directive, put in the task variables.comment
- string added to the task comments and used as a
notification commentdueDate
- the due date, set on the task instancetaskVariables
- additional task variables
NuxeoJbpmException
boolean canEndTask(NuxeoPrincipal principal, TaskInstance task) throws NuxeoJbpmException
NuxeoJbpmException
void acceptTask(CoreSession coreSession, NuxeoPrincipal principal, TaskInstance task, String comment) throws NuxeoJbpmException
JbpmEventNames.WORKFLOW_TASK_COMPLETED
and marking the task as
validated.
NuxeoJbpmException
endTask(CoreSession, NuxeoPrincipal, TaskInstance, String, String,
boolean)
void rejectTask(CoreSession coreSession, NuxeoPrincipal principal, TaskInstance task, String comment) throws NuxeoJbpmException
JbpmEventNames.WORKFLOW_TASK_REJECTED
and marking the task as
not validated.
NuxeoJbpmException
endTask(CoreSession, NuxeoPrincipal, TaskInstance, String, String,
boolean)
void endTask(CoreSession coreSession, NuxeoPrincipal principal, TaskInstance task, String comment, String eventName, boolean isValidated) throws NuxeoJbpmException
coreSession
- the session to use when notifying and resolving of
referenced document for notification.principal
- principal used when notifyingtask
- the instance to endcomment
- string added to the task comments and used as a
notification commenteventName
- the event name to use when notifyingisValidated
- boolean marker to state if the task was validated or
rejected
NuxeoJbpmException
- when trying to end a task without being
granted the right to do so (see
canEndTask(NuxeoPrincipal, TaskInstance)
), or when
any other error occurs
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |