Package org.jbpm.kie.services.impl.admin
Class UserTaskAdminServiceImpl
- java.lang.Object
-
- org.jbpm.kie.services.impl.admin.UserTaskAdminServiceImpl
-
- All Implemented Interfaces:
UserTaskAdminService
public class UserTaskAdminServiceImpl extends Object implements UserTaskAdminService
-
-
Field Summary
Fields Modifier and Type Field Description static int
ADMIN
static int
EXCL_OWNER
static int
POT_OWNER
-
Constructor Summary
Constructors Constructor Description UserTaskAdminServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acknowledgeError(String... errorId)
Acknowledge given error that it was reviewed and understoodvoid
addBusinessAdmins(long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new business admin for a given task.void
addBusinessAdmins(String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new business admin for a given task.void
addBusinessAdmins(String userId, String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new business admin for a given task.void
addExcludedOwners(long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new excluded owners for a given task.void
addExcludedOwners(String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new excluded owners for a given task.void
addExcludedOwners(String userId, String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new excluded owners for a given task.protected void
addPeopleAssignment(String deploymentId, long taskId, boolean removeExisting, int type, org.kie.api.task.model.OrganizationalEntity... orgEntities)
protected void
addPeopleAssignment(String userId, String deploymentId, long taskId, boolean removeExisting, int type, org.kie.api.task.model.OrganizationalEntity... orgEntities)
void
addPotentialOwners(long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new potential owners for a given task.void
addPotentialOwners(String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new potential owners for a given task.void
addPotentialOwners(String userId, String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Adds new potential owners for a given task.void
addTaskInput(long taskId, String name, Object value)
Adds new item to task input variables.void
addTaskInput(String deploymentId, long taskId, String name, Object value)
Adds new item to task input variables.void
addTaskInputs(long taskId, Map<String,Object> data)
Adds new items to task input variables.void
addTaskInputs(String deploymentId, long taskId, Map<String,Object> data)
Adds new items to task input variables.protected void
applyQueryContext(Map<String,Object> params, org.kie.api.runtime.query.QueryContext queryContext)
org.kie.internal.task.api.model.EmailNotification
buildEmailNotification(String subjectStr, List<org.kie.api.task.model.OrganizationalEntity> recipients, String bodyStr, String fromStr, String replyToStr)
Builds email notification based on given parameters that can be used as argument for notifyWhenNotStarted and notifyWhenNotCompleted methodsvoid
cancelNotification(long taskId, long notificationId)
Cancels given notification on a taskvoid
cancelNotification(String deploymentId, long taskId, long notificationId)
Cancels given notification on a taskvoid
cancelReassignment(long taskId, long reassignmentId)
Cancels given reassignment on a taskvoid
cancelReassignment(String deploymentId, long taskId, long reassignmentId)
Cancels given reassignment on a taskprotected List<Short>
getAckMode(boolean includeAcknowledged)
org.kie.internal.runtime.error.ExecutionError
getError(String errorId)
Returns execution error identified by given error idList<org.kie.internal.runtime.error.ExecutionError>
getErrors(boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)
Returns execution errors that are classified as task type errorsList<org.kie.internal.runtime.error.ExecutionError>
getErrorsByTaskId(long taskId, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)
Returns execution errors for given task idList<org.kie.internal.runtime.error.ExecutionError>
getErrorsByTaskName(String taskName, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)
Returns execution errors for given task nameList<org.kie.internal.runtime.error.ExecutionError>
getErrorsByTaskName(String processId, String taskName, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)
Returns execution errors for given task name and process idList<org.kie.internal.runtime.error.ExecutionError>
getErrorsByTaskName(String deploymentId, String processId, String taskName, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)
Returns execution errors for given task name, process id and deployment idCollection<TaskNotification>
getTaskNotifications(long taskId, boolean activeOnly)
Returns task notifications scheduled for given taskCollection<TaskNotification>
getTaskNotifications(String deploymentId, long taskId, boolean activeOnly)
Returns task notifications scheduled for given taskCollection<TaskReassignment>
getTaskReassignments(long taskId, boolean activeOnly)
Returns task reassignments scheduled for given taskCollection<TaskReassignment>
getTaskReassignments(String deploymentId, long taskId, boolean activeOnly)
Returns task reassignments scheduled for given taskprotected Long
notify(String deploymentId, long taskId, String timeExpression, org.kie.internal.task.api.TaskDeadlinesService.DeadlineType type, org.kie.internal.task.api.model.Notification notification)
Long
notifyWhenNotCompleted(long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification)
Sends notification (of notification type) to given recipients in case task was not completed before time given as timeExpression elapses.Long
notifyWhenNotCompleted(String deploymentId, long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification)
Sends notification (of notification type) to given recipients in case task was not completed before time given as timeExpression elapses.Long
notifyWhenNotStarted(long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification)
Sends notification (of notification type) to given recipients in case task was not started before time given as timeExpression elapses.Long
notifyWhenNotStarted(String deploymentId, long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification)
Sends notification (of notification type) to given recipients in case task was not started before time given as timeExpression elapses.protected Long
reassign(String deploymentId, long taskId, String timeExpression, org.kie.internal.task.api.TaskDeadlinesService.DeadlineType type, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Long
reassignWhenNotCompleted(long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Reassign automatically a task in case it was not completed before time given as timeExpression elapses.Long
reassignWhenNotCompleted(String deploymentId, long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Reassign automatically a task in case it was not completed before time given as timeExpression elapses.Long
reassignWhenNotStarted(long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Reassign automatically a task in case it was not started before time given as timeExpression elapses.Long
reassignWhenNotStarted(String deploymentId, long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Reassign automatically a task in case it was not started before time given as timeExpression elapses.void
removeBusinessAdmins(long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing business admin from given task.void
removeBusinessAdmins(String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing business admin from given task.void
removeBusinessAdmins(String userId, String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing business admin from given task.void
removeExcludedOwners(long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing excluded owners from given task.void
removeExcludedOwners(String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing excluded owners from given task.void
removeExcludedOwners(String userId, String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing excluded owners from given task.protected void
removePeopleAssignment(String deploymentId, long taskId, int type, org.kie.api.task.model.OrganizationalEntity... orgEntities)
protected void
removePeopleAssignment(String userId, String deploymentId, long taskId, int type, org.kie.api.task.model.OrganizationalEntity... orgEntities)
void
removePotentialOwners(long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing potential owners from given task.void
removePotentialOwners(String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing potential owners from given task.void
removePotentialOwners(String userId, String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities)
Remove existing potential owners from given task.void
removeTaskInputs(long taskId, String... name)
Removes one or more input variables from a task.void
removeTaskInputs(String deploymentId, long taskId, String... name)
Removes one or more input variables from a task.void
removeTaskOutputs(long taskId, String... name)
Removes one or more output variables from a task.void
removeTaskOutputs(String deploymentId, long taskId, String... name)
Removes one or more output variables from a task.void
setCommandService(TransactionalCommandService commandService)
void
setIdentityProvider(org.kie.internal.identity.IdentityProvider identityProvider)
void
setRuntimeDataService(RuntimeDataService runtimeDataService)
void
setUserTaskService(UserTaskService userTaskService)
protected void
validateTask(String deploymentId, Long taskId, UserTaskInstanceDesc task)
-
-
-
Field Detail
-
POT_OWNER
public static final int POT_OWNER
- See Also:
- Constant Field Values
-
EXCL_OWNER
public static final int EXCL_OWNER
- See Also:
- Constant Field Values
-
ADMIN
public static final int ADMIN
- See Also:
- Constant Field Values
-
-
Method Detail
-
setUserTaskService
public void setUserTaskService(UserTaskService userTaskService)
-
setRuntimeDataService
public void setRuntimeDataService(RuntimeDataService runtimeDataService)
-
setIdentityProvider
public void setIdentityProvider(org.kie.internal.identity.IdentityProvider identityProvider)
-
setCommandService
public void setCommandService(TransactionalCommandService commandService)
-
addPotentialOwners
public void addPotentialOwners(long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new potential owners for a given task. Can be instructed to remove existing potential owners which means that the task will be released in case it was claimed already. Task must be in active state.- Specified by:
addPotentialOwners
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idremoveExisting
- specifies if existing potential owners should be removedorgEntities
- one or more potential owner to be added to a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
addPotentialOwners
public void addPotentialOwners(String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new potential owners for a given task. Can be instructed to remove existing potential owners which means that the task will be released in case it was claimed already. Task must be in active state.- Specified by:
addPotentialOwners
in interfaceUserTaskAdminService
taskId
- unique task idremoveExisting
- specifies if existing potential owners should be removedorgEntities
- one or more potential owner to be added to a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
addPotentialOwners
public void addPotentialOwners(String userId, String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new potential owners for a given task. Can be instructed to remove existing potential owners which means that the task will be released in case it was claimed already. Task must be in active state.- Specified by:
addPotentialOwners
in interfaceUserTaskAdminService
- Parameters:
userId
- user doing the updatetaskId
- unique task idremoveExisting
- specifies if existing potential owners should be removedorgEntities
- one or more potential owner to be added to a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
addExcludedOwners
public void addExcludedOwners(long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new excluded owners for a given task. Can be instructed to remove existing excluded owners. Task must be in active state.- Specified by:
addExcludedOwners
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idremoveExisting
- specifies if existing excluded owners should be removedorgEntities
- one or more excluded owner to be added to a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
addExcludedOwners
public void addExcludedOwners(String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new excluded owners for a given task. Can be instructed to remove existing excluded owners. Task must be in active state.- Specified by:
addExcludedOwners
in interfaceUserTaskAdminService
taskId
- unique task idremoveExisting
- specifies if existing excluded owners should be removedorgEntities
- one or more excluded owner to be added to a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
addExcludedOwners
public void addExcludedOwners(String userId, String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new excluded owners for a given task. Can be instructed to remove existing excluded owners. Task must be in active state.- Specified by:
addExcludedOwners
in interfaceUserTaskAdminService
- Parameters:
userId
- user doing the updatetaskId
- unique task idremoveExisting
- specifies if existing excluded owners should be removedorgEntities
- one or more excluded owner to be added to a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
addBusinessAdmins
public void addBusinessAdmins(long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new business admin for a given task. Can be instructed to remove existing business admins. Task must be in active state.- Specified by:
addBusinessAdmins
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idremoveExisting
- specifies if existing business admins should be removedorgEntities
- one or more business admin to be added to a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
addBusinessAdmins
public void addBusinessAdmins(String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new business admin for a given task. Can be instructed to remove existing business admins. Task must be in active state.- Specified by:
addBusinessAdmins
in interfaceUserTaskAdminService
taskId
- unique task idremoveExisting
- specifies if existing business admins should be removedorgEntities
- one or more business admin to be added to a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
addBusinessAdmins
public void addBusinessAdmins(String userId, String deploymentId, long taskId, boolean removeExisting, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new business admin for a given task. Can be instructed to remove existing business admins. Task must be in active state.- Specified by:
addBusinessAdmins
in interfaceUserTaskAdminService
- Parameters:
userId
- user doing the updatetaskId
- unique task idremoveExisting
- specifies if existing business admins should be removedorgEntities
- one or more business admin to be added to a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
removePotentialOwners
public void removePotentialOwners(long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Remove existing potential owners from given task. Task must be in active state.- Specified by:
removePotentialOwners
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idorgEntities
- one or more potential owner to be removed from a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
removePotentialOwners
public void removePotentialOwners(String userId, String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Remove existing potential owners from given task. Task must be in active state.- Specified by:
removePotentialOwners
in interfaceUserTaskAdminService
- Parameters:
userId
- user doing the updatetaskId
- unique task idorgEntities
- one or more potential owner to be removed from a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
removePotentialOwners
public void removePotentialOwners(String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Remove existing potential owners from given task. Task must be in active state.- Specified by:
removePotentialOwners
in interfaceUserTaskAdminService
taskId
- unique task idorgEntities
- one or more potential owner to be removed from a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
removeExcludedOwners
public void removeExcludedOwners(long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Remove existing excluded owners from given task. Task must be in active state.- Specified by:
removeExcludedOwners
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idorgEntities
- one or more excluded owner to be removed from a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
removeExcludedOwners
public void removeExcludedOwners(String userId, String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Remove existing excluded owners from given task. Task must be in active state.- Specified by:
removeExcludedOwners
in interfaceUserTaskAdminService
- Parameters:
userId
- user doing the updatetaskId
- unique task idorgEntities
- one or more excluded owner to be removed from a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
removeExcludedOwners
public void removeExcludedOwners(String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Remove existing excluded owners from given task. Task must be in active state.- Specified by:
removeExcludedOwners
in interfaceUserTaskAdminService
taskId
- unique task idorgEntities
- one or more excluded owner to be removed from a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
removeBusinessAdmins
public void removeBusinessAdmins(long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException, IllegalStateException
Description copied from interface:UserTaskAdminService
Remove existing business admin from given task. Task must be in active state.- Specified by:
removeBusinessAdmins
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idorgEntities
- one or more business admin to be removed from a task- Throws:
TaskNotFoundException
- thrown when there is no task with given idIllegalStateException
- in case there are no business admins left on a task - there must be at least one business admin
-
removeBusinessAdmins
public void removeBusinessAdmins(String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException, IllegalStateException
Description copied from interface:UserTaskAdminService
Remove existing business admin from given task. Task must be in active state.- Specified by:
removeBusinessAdmins
in interfaceUserTaskAdminService
taskId
- unique task idorgEntities
- one or more business admin to be removed from a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment idIllegalStateException
- in case there are no business admins left on a task - there must be at least one business admin
-
removeBusinessAdmins
public void removeBusinessAdmins(String userId, String deploymentId, long taskId, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException, IllegalStateException
Description copied from interface:UserTaskAdminService
Remove existing business admin from given task. Task must be in active state.- Specified by:
removeBusinessAdmins
in interfaceUserTaskAdminService
- Parameters:
userId
- user doing the updatetaskId
- unique task idorgEntities
- one or more business admin to be removed from a task- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment idIllegalStateException
- in case there are no business admins left on a task - there must be at least one business admin
-
addTaskInput
public void addTaskInput(long taskId, String name, Object value) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new item to task input variables.- Specified by:
addTaskInput
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idname
- name of the input variable to be addedvalue
- value of the input variable- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
addTaskInput
public void addTaskInput(String deploymentId, long taskId, String name, Object value) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new item to task input variables.- Specified by:
addTaskInput
in interfaceUserTaskAdminService
taskId
- unique task idname
- name of the input variable to be addedvalue
- value of the input variable- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
addTaskInputs
public void addTaskInputs(long taskId, Map<String,Object> data) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new items to task input variables.- Specified by:
addTaskInputs
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task iddata
- map of key (name of the variable) and value (value of the variable)- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
addTaskInputs
public void addTaskInputs(String deploymentId, long taskId, Map<String,Object> data) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Adds new items to task input variables.- Specified by:
addTaskInputs
in interfaceUserTaskAdminService
taskId
- unique task iddata
- map of key (name of the variable) and value (value of the variable)- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
removeTaskInputs
public void removeTaskInputs(long taskId, String... name) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Removes one or more input variables from a task.- Specified by:
removeTaskInputs
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idname
- name(s) of the input variables to be removed- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
removeTaskInputs
public void removeTaskInputs(String deploymentId, long taskId, String... name) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Removes one or more input variables from a task.- Specified by:
removeTaskInputs
in interfaceUserTaskAdminService
taskId
- unique task idname
- name(s) of the input variables to be removed- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
removeTaskOutputs
public void removeTaskOutputs(long taskId, String... name) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Removes one or more output variables from a task.- Specified by:
removeTaskOutputs
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idname
- name(s) of the output variables to be removed- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
removeTaskOutputs
public void removeTaskOutputs(String deploymentId, long taskId, String... name) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Removes one or more output variables from a task.- Specified by:
removeTaskOutputs
in interfaceUserTaskAdminService
taskId
- unique task idname
- name(s) of the output variables to be removed- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
reassignWhenNotStarted
public Long reassignWhenNotStarted(long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Reassign automatically a task in case it was not started before time given as timeExpression elapses.- Specified by:
reassignWhenNotStarted
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idtimeExpression
- time expression in duration format as 2s, 5h, 7dorgEntities
- users/groups that will be reassigned to after conditions are met- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
reassignWhenNotStarted
public Long reassignWhenNotStarted(String deploymentId, long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Reassign automatically a task in case it was not started before time given as timeExpression elapses.- Specified by:
reassignWhenNotStarted
in interfaceUserTaskAdminService
taskId
- unique task idtimeExpression
- time expression in duration format as 2s, 5h, 7dorgEntities
- users/groups that will be reassigned to after conditions are met- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
reassignWhenNotCompleted
public Long reassignWhenNotCompleted(long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Reassign automatically a task in case it was not completed before time given as timeExpression elapses.- Specified by:
reassignWhenNotCompleted
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idtimeExpression
- time expression in duration format as 2s, 5h, 7dorgEntities
- users/groups that will be reassigned to after conditions are met- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
reassignWhenNotCompleted
public Long reassignWhenNotCompleted(String deploymentId, long taskId, String timeExpression, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Reassign automatically a task in case it was not completed before time given as timeExpression elapses.- Specified by:
reassignWhenNotCompleted
in interfaceUserTaskAdminService
taskId
- unique task idtimeExpression
- time expression in duration format as 2s, 5h, 7dorgEntities
- users/groups that will be reassigned to after conditions are met- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
notifyWhenNotStarted
public Long notifyWhenNotStarted(long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Sends notification (of notification type) to given recipients in case task was not started before time given as timeExpression elapses.- Specified by:
notifyWhenNotStarted
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idtimeExpression
- time expression in duration format as 2s, 5h, 7dnotification
- actual notification to be sent- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
notifyWhenNotStarted
public Long notifyWhenNotStarted(String deploymentId, long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Sends notification (of notification type) to given recipients in case task was not started before time given as timeExpression elapses.- Specified by:
notifyWhenNotStarted
in interfaceUserTaskAdminService
taskId
- unique task idtimeExpression
- time expression in duration format as 2s, 5h, 7dnotification
- actual notification to be sent- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
notifyWhenNotCompleted
public Long notifyWhenNotCompleted(long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Sends notification (of notification type) to given recipients in case task was not completed before time given as timeExpression elapses.- Specified by:
notifyWhenNotCompleted
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idtimeExpression
- time expression in duration format as 2s, 5h, 7dnotification
- actual notification to be sent- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
notifyWhenNotCompleted
public Long notifyWhenNotCompleted(String deploymentId, long taskId, String timeExpression, org.kie.internal.task.api.model.Notification notification) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Sends notification (of notification type) to given recipients in case task was not completed before time given as timeExpression elapses.- Specified by:
notifyWhenNotCompleted
in interfaceUserTaskAdminService
taskId
- unique task idtimeExpression
- time expression in duration format as 2s, 5h, 7dnotification
- actual notification to be sent- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
getTaskReassignments
public Collection<TaskReassignment> getTaskReassignments(long taskId, boolean activeOnly) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Returns task reassignments scheduled for given task- Specified by:
getTaskReassignments
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idactiveOnly
- determines if only active (not yet fired) should be returned- Returns:
- returns list of task reassignments for given task
- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
getTaskReassignments
public Collection<TaskReassignment> getTaskReassignments(String deploymentId, long taskId, boolean activeOnly) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Returns task reassignments scheduled for given task- Specified by:
getTaskReassignments
in interfaceUserTaskAdminService
taskId
- unique task idactiveOnly
- determines if only active (not yet fired) should be returned- Returns:
- returns list of task reassignments for given task
- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
getTaskNotifications
public Collection<TaskNotification> getTaskNotifications(long taskId, boolean activeOnly) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Returns task notifications scheduled for given task- Specified by:
getTaskNotifications
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idactiveOnly
- determines if only active (not yet fired) should be returned- Returns:
- returns list of task notifications for given task
- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
getTaskNotifications
public Collection<TaskNotification> getTaskNotifications(String deploymentId, long taskId, boolean activeOnly) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Returns task notifications scheduled for given task- Specified by:
getTaskNotifications
in interfaceUserTaskAdminService
taskId
- unique task idactiveOnly
- determines if only active (not yet fired) should be returned- Returns:
- returns list of task notifications for given task
- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
cancelNotification
public void cancelNotification(long taskId, long notificationId) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Cancels given notification on a task- Specified by:
cancelNotification
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idnotificationId
- unique notification id- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
cancelNotification
public void cancelNotification(String deploymentId, long taskId, long notificationId) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Cancels given notification on a task- Specified by:
cancelNotification
in interfaceUserTaskAdminService
taskId
- unique task idnotificationId
- unique notification id- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
cancelReassignment
public void cancelReassignment(long taskId, long reassignmentId) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Cancels given reassignment on a task- Specified by:
cancelReassignment
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idreassignmentId
- unique reassignment id- Throws:
TaskNotFoundException
- thrown when there is no task with given id
-
cancelReassignment
public void cancelReassignment(String deploymentId, long taskId, long reassignmentId) throws TaskNotFoundException
Description copied from interface:UserTaskAdminService
Cancels given reassignment on a task- Specified by:
cancelReassignment
in interfaceUserTaskAdminService
taskId
- unique task idreassignmentId
- unique reassignment id- Throws:
TaskNotFoundException
- thrown when there is no task with given id or is not associated with given deployment id
-
buildEmailNotification
public org.kie.internal.task.api.model.EmailNotification buildEmailNotification(String subjectStr, List<org.kie.api.task.model.OrganizationalEntity> recipients, String bodyStr, String fromStr, String replyToStr)
Description copied from interface:UserTaskAdminService
Builds email notification based on given parameters that can be used as argument for notifyWhenNotStarted and notifyWhenNotCompleted methods- Specified by:
buildEmailNotification
in interfaceUserTaskAdminService
- Parameters:
subjectStr
- email subjectrecipients
- list of recipients to be included in the notification, must be at least onebodyStr
- email body, can reference task variablesfromStr
- user who sends the emailreplyToStr
- optional reply to address- Returns:
- completely configured email notification instance
-
getErrors
public List<org.kie.internal.runtime.error.ExecutionError> getErrors(boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:UserTaskAdminService
Returns execution errors that are classified as task type errors- Specified by:
getErrors
in interfaceUserTaskAdminService
- Parameters:
includeAcknowledged
- indicates whether to include acknowledged errors or notqueryContext
- control parameters for pagination- Returns:
- list of found errors
-
getErrorsByTaskId
public List<org.kie.internal.runtime.error.ExecutionError> getErrorsByTaskId(long taskId, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:UserTaskAdminService
Returns execution errors for given task id- Specified by:
getErrorsByTaskId
in interfaceUserTaskAdminService
- Parameters:
taskId
- unique task idincludeAcknowledged
- indicates whether to include acknowledged errors or notqueryContext
- control parameters for pagination- Returns:
- list of found errors
-
getErrorsByTaskName
public List<org.kie.internal.runtime.error.ExecutionError> getErrorsByTaskName(String taskName, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:UserTaskAdminService
Returns execution errors for given task name- Specified by:
getErrorsByTaskName
in interfaceUserTaskAdminService
- Parameters:
taskName
- name of the taskincludeAcknowledged
- indicates whether to include acknowledged errors or notqueryContext
- control parameters for pagination- Returns:
- list of found errors
-
getErrorsByTaskName
public List<org.kie.internal.runtime.error.ExecutionError> getErrorsByTaskName(String processId, String taskName, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:UserTaskAdminService
Returns execution errors for given task name and process id- Specified by:
getErrorsByTaskName
in interfaceUserTaskAdminService
- Parameters:
processId
- process id of the process that task belongs totaskName
- name of the taskincludeAcknowledged
- indicates whether to include acknowledged errors or notqueryContext
- control parameters for pagination- Returns:
- list of found errors
-
getErrorsByTaskName
public List<org.kie.internal.runtime.error.ExecutionError> getErrorsByTaskName(String deploymentId, String processId, String taskName, boolean includeAcknowledged, org.kie.api.runtime.query.QueryContext queryContext)
Description copied from interface:UserTaskAdminService
Returns execution errors for given task name, process id and deployment id- Specified by:
getErrorsByTaskName
in interfaceUserTaskAdminService
- Parameters:
deploymentId
- deployment id that contains given processprocessId
- process id of the process that task belongs totaskName
- name of the taskincludeAcknowledged
- indicates whether to include acknowledged errors or notqueryContext
- control parameters for pagination- Returns:
- list of found errors
-
acknowledgeError
public void acknowledgeError(String... errorId) throws ExecutionErrorNotFoundException
Description copied from interface:UserTaskAdminService
Acknowledge given error that it was reviewed and understood- Specified by:
acknowledgeError
in interfaceUserTaskAdminService
- Parameters:
errorId
- unique id of the error- Throws:
ExecutionErrorNotFoundException
- thrown when there is no unacknowledged error with that id
-
getError
public org.kie.internal.runtime.error.ExecutionError getError(String errorId) throws ExecutionErrorNotFoundException
Description copied from interface:UserTaskAdminService
Returns execution error identified by given error id- Specified by:
getError
in interfaceUserTaskAdminService
- Parameters:
errorId
- unique id of the error- Returns:
- returns execution error instance
- Throws:
ExecutionErrorNotFoundException
- is thrown in case no error was found for given error id
-
addPeopleAssignment
protected void addPeopleAssignment(String userId, String deploymentId, long taskId, boolean removeExisting, int type, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
- Throws:
TaskNotFoundException
-
addPeopleAssignment
protected void addPeopleAssignment(String deploymentId, long taskId, boolean removeExisting, int type, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
- Throws:
TaskNotFoundException
-
removePeopleAssignment
protected void removePeopleAssignment(String userId, String deploymentId, long taskId, int type, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
- Throws:
TaskNotFoundException
-
removePeopleAssignment
protected void removePeopleAssignment(String deploymentId, long taskId, int type, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
- Throws:
TaskNotFoundException
-
reassign
protected Long reassign(String deploymentId, long taskId, String timeExpression, org.kie.internal.task.api.TaskDeadlinesService.DeadlineType type, org.kie.api.task.model.OrganizationalEntity... orgEntities) throws TaskNotFoundException
- Throws:
TaskNotFoundException
-
notify
protected Long notify(String deploymentId, long taskId, String timeExpression, org.kie.internal.task.api.TaskDeadlinesService.DeadlineType type, org.kie.internal.task.api.model.Notification notification) throws TaskNotFoundException
- Throws:
TaskNotFoundException
-
applyQueryContext
protected void applyQueryContext(Map<String,Object> params, org.kie.api.runtime.query.QueryContext queryContext)
-
validateTask
protected void validateTask(String deploymentId, Long taskId, UserTaskInstanceDesc task)
-
-