-
Bug
-
Resolution: Done
-
Major
-
None
-
6.0.1
-
None
Description of problem:
When you call TaskService.getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, String language, int firstResult, int maxResults) via REST API, it throws java.lang.UnsupportedOperationException.
It is because org.kie.services.client.api.command.AcceptedCommands doesn't list GetTaskAssignedAsPotentialOwnerPagingCommand().
Steps to Reproduce:
1. Create ksession/taskService from RemoteRestRuntimeFactory.
2. Call TaskService.getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, String language, int firstResult, int maxResults)
—
RemoteRestRuntimeFactory restSessionFactory = new RemoteRestRuntimeFactory(deploymentId, appUrl, user, password);
RemoteRuntimeEngine engine = restSessionFactory.newRuntimeEngine();
KieSession ksession = engine.getKieSession();
TaskService taskService = engine.getTaskService();
ProcessInstance processInstance = ksession.startProcess("project1.helloProcess", null);
List<String> groupIds = new ArrayList<String>();
groupIds.add("IT");
List<TaskSummary> tasksAssignedAsPotentialOwner = taskService.getTasksAssignedAsPotentialOwner("john",
groupIds, "en-UK", 1, 10);
—
Actual results:
—
Exception in thread "main" java.lang.UnsupportedOperationException: The .getTasksAssignedAsPotentialOwner(..) method is not supported on the remote api.
at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:95)
at org.jbpm.services.task.impl.command.CommandBasedTaskService.getTasksAssignedAsPotentialOwner(CommandBasedTaskService.java:416)
at com.sample.SimpleRestClientFail.main(SimpleRestClientFail.java:44)
—
Expected results:
Returns taskSummary list.
- is duplicated by
-
RHBPMS-3467 UnsupportedOperationException when TaskService.getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, String language, int firstResult, int maxResults)
- Closed