kie java api does not find tasks when assigned to group

Posted on

I am evaluating the bpms 6 (; i have a process which has a task assigned to a group;
if i login with a user who belongs to that group, i can see the task
if i call to the rest api using a url like this http://localhost:8080/business-central/rest/task/query?potentialOwner=srvcli01, i can see the task

But if i do this:

URL baseUrl = new URL("http://localhost:8080/business-central/");
RemoteRestRuntimeFactory factory = new RemoteRestRuntimeFactory(DEPLOYMENT_ID, baseUrl, USER, PASSWORD);
RuntimeEngine engine = factory.newRuntimeEngine();
TaskService service = engine.getTaskService();
List tasks = service.getTasksAssignedAsPotentialOwner("srvcli01", "en-UK");

then, i get no results; tasks list is empty

I have my java client web application configured like this:


Any ideas ?