Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-401

Tasks List View doesn't respect a custom UserGroupCallback

    Details

    • Target Release:
    • Fix Build:
      CR1
    • Steps to Reproduce:
      Hide
      • To configure a custom UserGroupCallback, use attached custom-user-group-callback-bpms6.4.zip. This UserGroupCallback's getGroupsForUser() always returns "PM" and "HR" for a user.
      • Build my-usergroupcallback-1.0.0.jar and my-usergroupinfoproducer-1.0.0.jar
      • Copy 2 jars under business-central.war/WEB-INF/lib
      • Edit business-central.war/WEB-INF/beans.xml
        <?xml version="1.0" encoding="utf-8"?>
        <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://docs.jboss.org/cdi/beans_1_0.xsd">
          <alternatives>
            <class>com.sample.MyUserGroupInfoProducer</class>
          </alternatives>
        </beans>
        
      • Start BPM Suite
      • Login as bpmsAdmin (make sure bpmsAdmin doesn't belong to "HR" in as EAP user)
      • Import the attached org.jbpm.helloProcess.v1.0-HR.bpmn2
      • Build&Deploy
      • Start helloProcess via "Process Management" -> "Process definitions". It will create a Task for group "HR"
      • Go to "Tasks" and click "Group" tab. Task is not displayed.
      Show
      To configure a custom UserGroupCallback, use attached custom-user-group-callback-bpms6.4.zip. This UserGroupCallback's getGroupsForUser() always returns "PM" and "HR" for a user. Build my-usergroupcallback-1.0.0.jar and my-usergroupinfoproducer-1.0.0.jar Copy 2 jars under business-central.war/WEB-INF/lib Edit business-central.war/WEB-INF/beans.xml <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://docs.jboss.org/cdi/beans_1_0.xsd"> <alternatives> <class>com.sample.MyUserGroupInfoProducer</class> </alternatives> </beans> Start BPM Suite Login as bpmsAdmin (make sure bpmsAdmin doesn't belong to "HR" in as EAP user) Import the attached org.jbpm.helloProcess.v1.0-HR.bpmn2 Build&Deploy Start helloProcess via "Process Management" -> "Process definitions". It will create a Task for group "HR" Go to "Tasks" and click "Group" tab. Task is not displayed.
    • Sprint:
      2018 Week 17-18

      Description

      Configure a custom UserGroupCallback for Business Central (by a custom UserGroupInfoProducer via beans.xml). But "Group" tab of "Tasks List" View displays tasks for login user's groups resolved by JAAS instead of tasks for login user's groups resolved by the custom UserGroupCallback.

      I see that the custom UserGroupCallback is actually applied to TaskService of RuntimeManager in business-central. So most of operations are done through TaskService with the custom UserGroupCallback (e.g. Pressing "Start" for the selected Task in the Task View, or remote REST call of cusiness-central). But displayed records in "Tasks List" themselves are not affected by TaskService/UserGroupCallback. I see that DataSetTasksListGridViewImpl queries database filtered by user and groups of login errai User hence JAAS based.

      https://github.com/kiegroup/jbpm-wb/blob/6.5.x/jbpm-console-ng-human-tasks/jbpm-console-ng-human-tasks-client/src/main/java/org/jbpm/console/ng/ht/client/editors/taskslist/grid/AbstractTasksListGridPresenter.java#L208-L229

      For RHBA 7, it's executed in kie-server side but similar logic is applied by PotOwnerTasksPreprocessor.

      https://github.com/kiegroup/jbpm/blob/7.6.x/jbpm-services/jbpm-kie-services/src/main/java/org/jbpm/kie/services/impl/query/preprocessor/PotOwnerTasksPreprocessor.java#L52-L79

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  cristiano.nicolai Cristiano Nicolai
                  Reporter:
                  tkobayashi Toshiya Kobayashi
                  Tester:
                  Bojan Sremac
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: