Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-4184

[GSS] (6.3.z) getTasksAssignedAsPotentialOwner doesn't allow groups searching, only actorid

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 6.3.3
    • 6.2.0
    • Business Central
    • None

      It's a split of the original Jira RHBPMS-1904.

      The above was fixed (actually by RHBPMS-4178) the "claim" issue when a system user tries to claim a task on behalf of a different user.
      However how to list the task is also a problem. The getTasksAssignedAsPotentialOwner() only works for ActorId searching and there is no method in public API to allow customer to search for group when using system users. The suggested workaround using GetTasksByVariousFieldsCommand is not doable according to user, since it is a deprecated command.

      ------------------------------------------
      Description of problem:

      I am trying to with below API's to list the HumanTask assigned to group through Remote REST API's but it fails with exception:

      ~~~
      Unable to execute GetTaskAssignedAsPotentialOwnerCommand/0: org.kie.remote.services.rest.exception.KieRemoteRestOperationException: Organizational entity already exists with [UserImpl:'HR'] id, please check that there is no group and user with same id
      ~~~

      Code:
      =====================
      RuntimeEngine engine = RemoteRuntimeEngineFactory.newRestBuilder()
      .addUrl(url).addUserName(userName).addPassword(passWord)
      .addDeploymentId(deploymentId).build();

      KieSession ksession = engine.getKieSession();
      TaskService taskService = engine.getTaskService();

      ProcessInstance processInstance = ksession.startProcess("project1.TestProcess");
      tasklist = taskService.getTasksAssignedAsPotentialOwner("HR","en-UK");

      =====================

      Version-Release number of selected component (if applicable):
      BPMS 6.2.2

      How reproducible:

      Steps to Reproduce:
      1. Start server(BPMS 6.2.2) with -Dorg.kie.task.insecure=true and deploy attached kajr.
      2. Apply one-off patch attached to BZ-1325945 and use -Dorg.kie.task.insecure=true option in client side and server side.
      3. Try to list task using Remote REST API

      Actual results:
      Not able to list User Task assigned to group through Remote REST API

      Expected results:
      User should be able to list task assigned to group through Remote REST API

      Additional info:

              swiderski.maciej Maciej Swiderski (Inactive)
              rhn-support-alazarot Alessandro Lazarotti
              Tomáš Livora Tomáš Livora (Inactive)
              Tomáš Livora Tomáš Livora (Inactive)
              William Siqueira
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: