2 Replies Latest reply on Jun 13, 2012 10:19 AM by jena74

    jBPM 5.3 - Human Task Service and administrator user

    jena74

      Hello,

       

      I am using the Human Task service in a standalone Java application.

      Everything is ok when I don't use the file jbpm.usergroup.callback.properties to precise and callback for managing users and groups.

      But, when I provide such a file with jbpm.usergroup.callback=org.jbpm.task.service.DefaultUserGroupCallbackImpl inside, I have the following error:

       

      org.jbpm.task.service.CannotAddTaskException: There are no known Business Administrators, task cannot be created according to WS-HT specification

       

      In the documentation, it is written that an Administrator user must exists in the Human Task service.

      So in my code I have added

      taskSession.addUser(new org.jbpm.task.User("Administrator"));

      but nothing changes and the error is still there.

       

      How can I declare an Administrator user in the Human Task server?

      Any idea to solve this will be appreciated.

      Thanks a lot.

       

      Jena

        • 1. Re: jBPM 5.3 - Human Task Service and administrator user
          salaboy21

          That sounds weird, can you create a small test that we can use to reproduce that issue?

          Can you import the org.jbpm.task.service.DefaultUserGroupCallbackImpl into one of your java classes to see that the class is in the correct package?

          Are you using jBPM5.2 or 5.3 or master?

           

          Cheers

          • 2. Re: jBPM 5.3 - Human Task Service and administrator user
            jena74

            Hi,

             

            I use jBPM5.3.

            I did some new tests and in fact I found that the problem comes from the client side.

            When the client creates the task, it as to set up the people assignements of the task, including both recipients and businessAdministrators.

            If I add the Administrator user in the server, and if I use the following code on the client side, it works well:

             

            // Set task recipients.
            List<OrganizationalEntity> recipients = new ArrayList<OrganizationalEntity>();
            recipients.add(new Group("The team"));
            peopleAssignements.setRecipients(recipients);
            List<OrganizationalEntity> businessAdministrators = new ArrayList<OrganizationalEntity>();
            businessAdministrators.add(new User("Administrator"));
            peopleAssignements.setBusinessAdministrators(businessAdministrators);
            task.setPeopleAssignments(peopleAssignements);