cancel
Showing results for 
Search instead for 
Did you mean: 

reassign one user task to other user through java

kranthi
Star Contributor
Star Contributor

How can we reassign one user task to other user by using java code? I am getting user task through workflowService.getAssignedTasks(assignUserName, WorkflowTaskState.IN_PROGRESS, true); here workflowtasks are coming after that how we will proceed to assign task to other user.

1 ACCEPTED ANSWER

kranthi
Star Contributor
Star Contributor

List<WorkflowTask> tasks = workflowService.getAssignedTasks(assignUserName, WorkflowTaskState.IN_PROGRESS, true);
logger.debug("tasks:"+tasks+"\n"+tasks.size());
for (WorkflowTask task:tasks)
{
String taskID=task.getId();
taskService.setAssignee(taskID.substring(taskID.lastIndexOf("$")+1),delegator);
}

View answer in original post

1 REPLY 1

kranthi
Star Contributor
Star Contributor

List<WorkflowTask> tasks = workflowService.getAssignedTasks(assignUserName, WorkflowTaskState.IN_PROGRESS, true);
logger.debug("tasks:"+tasks+"\n"+tasks.size());
for (WorkflowTask task:tasks)
{
String taskID=task.getId();
taskService.setAssignee(taskID.substring(taskID.lastIndexOf("$")+1),delegator);
}

Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.