Bug 1028883

Summary: ParticipantPanel in business-central shows no participantUsers/participantGroups
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Toshiya Kobayashi <tkobayas>
Component: jBPM ConsoleAssignee: Kris Verlaenen <kverlaen>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.1   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ParticipantPanel.png none

Description Toshiya Kobayashi 2013-11-11 06:27:42 UTC
Description of problem:

ParticipantPanel in business-central has blank participantUsers/participantGroups and "Assign" button is disabled. "ParticipantPanel" refers to "Task details" panel after choosing "Participants" dropdown (See attached ParticipantPanel.png) in "Groups Tasks" view.


Steps to Reproduce:
1. Create a Human Task which potential owner is a group (e.g. 'HR')
2. Login with a member of the group (e.g. 'mary')
3. The task shows up in "Groups Tasks" view
4. Click the task and choose "Participants" dropdown in "Task details" panel


Actual results:

Both 'Groups' and 'Users' are blank and "Assign" button is disabled.

Expected results:

'Groups' shows 'HR' and 'Users' shows members in 'HR' group. "Assign" button is enabled when one of the members is selected.

* I'm not sure what the exactly "Expected results" are. This requires developer's review.

Comment 1 Toshiya Kobayashi 2013-11-11 06:29:24 UTC
Analysis:

1) Looking at ParticipantPanel.java, it depends on TaskRef.participantUsers/participantGroups.

https://github.com/bpmc/bpm-console/blob/2.3.x/gui/app-base/src/main/java/org/jboss/bpm/console/client/task/ParticipantPanel.java#L127

2) Looking at the bottom panel in business-central, I observed the REST call.

2013-11-07 10:40:53,821 [DEBUG] new subscription: appContext.model.listener -> org.jboss.bpm.console.client.task.OpenTasksView$7@120
2013-11-07 10:40:53,823 [DEBUG] New Subscription: appContext.model.listener
2013-11-07 10:40:54,337 [DEBUG] GET: http://localhost:8080/business-central-server/rs/tasks/mary/participation
2013-11-07 10:40:54,378 [DEBUG] parse {"tasks":[{"id":2,"processInstanceId":"2","processId":"defaultPackage.helloTask","name":"helloTask","assignee":"","isBlocking":false,"isSignalling":false,"outcomes":[],"currentState":"OPEN","participantUsers":[],"participantGroups":[],"url":"http://localhost:8080/business-central-server/rs/form/task/2/render","priority":0}]}
2013-11-07 10:40:54,380 [DEBUG] parse {"id":2, "processInstanceId":"2", "processId":"defaultPackage.helloTask", "name":"helloTask", "assignee":"", "isBlocking":false, "isSignalling":false, "outcomes":[], "currentState":"OPEN", "participantUsers":[], "participantGroups":[], "url":"http://localhost:8080/business-central-server/rs/form/task/2/render", "priority":0}
2013-11-07 10:40:54,388 [INFO ] Loaded 1 tasks

3) TaskListFacade.getTasksForIdRefParticipation() is responsible for the REST call.

4) Tasks are returned by TaskManagement.getUnassignedTasks() and transformed into TaskRef. But there is no chance to populate participantUsers/participantGroups so the task is returned with empty participantUsers/participantGroups.

https://github.com/droolsjbpm/jbpm/blob/5.2.x/jbpm-gwt/jbpm-gwt-core/src/main/java/org/jbpm/integration/console/TaskManagement.java#L151

Comment 2 Toshiya Kobayashi 2013-11-11 06:38:17 UTC
Created attachment 822297 [details]
ParticipantPanel.png