Issue after Re-Assigning Task

Hi All,
I’ve a task which gets assigned to say “Role1” when it queues (Using Assignment Event).
As part of the functionality, a user say “User1” from “Role1” accepts it and says “Approve”.
Instead of completing the task when the user clicks on “Approve”, I set acceptedby list to empty and re-assign the task to another role “Role2”. I’m using updateTask IS service to accomplish the above.

Now the issue is that, when we use searchTasks IS service to retrieve the tasks for “User1” the above task is also listed which ideally should not as the task is now assigned to “Role2”.
The task doesn’t get listed if any user from “Role2” accepts it.

Please find below the inputs i’m passing to searchTasks service.
“includeTaskData” → true
“user” → user for whom tasks needs to be listed
“searchUserTasks” → true
“TaskSearchQuery/DoNotShowAcceptedByOthers” → true
“TaskSearchQuery/ShowNonActiveTasks” → false
and conditions on business data.

“We are not using CAF as the front-end so we need to achieve this using IS services”
Please let me know if I’m doing anything wrong while using searchTasks service or updateTask service.

Thanks in Advance!

Regards,
Sravan

  1. Use getTask service and check the values for assignedToList and acceptedByList.
  2. Instead of using IS service to reassign the task and to set accepted list to null, You can do it in CAF itselg
    code will look similar to below
    get.getTaskInfo.setAssignedToList(rolesList);

get.applyChangesNoAccept();

  1. Use getTask service and check the values for assignedToList and acceptedByList.
  2. Instead of using IS service to reassign the task and to set accepted list to null, You can do it in CAF itselg
    code will look similar to below
get<TaskName>.getTaskInfo.setAssignedToList(rolesList);
get<TaskName>.getTaskInfo.setAcceptedByList(null);
get<TaskName>.applyChangesNoAccept();

Thanks for the reply!!
But I forgot to mention in my original post that CAF is not the front-end here, so we need to do through the TaskClient services to achieve the same.

ok… did you Use getTask service to check the values for assignedToList and acceptedByList , after using updateTask service

Sravan:

Two things allows you to see your assigned tasks in the inbox (the tasks returned by searchTasks):

  1. The user or role assigned, which can be checked using getTask service.

  2. The user or role permissions granted to the “portlet task” used in the implementation of the activity in the process model.

Hope this help.

Regards.