Hi,
I've setup a simple workflow template with one manual activity that assigned to a group, this group contains two user
1. username=director1, user_login_name = director1
2. username=John Doe, user_login_name = john
I've try to initiate one workflow, and I try to retrieve a task for those user with GetMyTasks method in DFS TaskManagement service.
This is my code
---
ServiceFactory serviceFactory = ServiceFactory.getInstance();
ITaskManagementService taskService =
serviceFactory.getRemoteService(ITaskManagementService.class, serviceContext,
"bpm", "http://localhost:9080/services");
ArrayList status = new ArrayList<TStatus>();
status.add(TStatus.fromValue("READY"));
status.add(TStatus.fromValue("RESERVED"));
status.add(TStatus.fromValue("IN_PROGRESS"));
status.add(TStatus.fromValue("SUSPENDED"));
log.debug("Call DFS service");
String scope = "ActualOwner";
if (includePotentialTask)
scope = "PotentialOwners";
log.debug("Scope : "+scope);
List<TTask> tasks = taskService.getMyTasks(
"ALL",
scope,
null,
status,
null,
null,
maxEntries);
log.debug("DFS returns "+tasks.size()+" tasks");
---
The problem is this code will return 1 task for user director1 and 0 task for user john. I've verified manually using the webtop, both user have one task in their inbox. I guess the problem is with the user naming, I've create some other user with this pattern, and I found that user with user_name not equal with user_login_name won't be able to get their "potential" tasks.
Anyone having the same problem?