Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1105122

Summary: Avoid redundant calls of UserGroupCallback methods
Product: [Retired] JBoss BPMS Platform 6 Reporter: Martin Weiler <mweiler>
Component: jBPM CoreAssignee: Alessandro Lazarotti <alazarot>
Status: CLOSED EOL QA Contact: Marek Baluch <mbaluch>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.1CC: ravindra.tubati
Target Milestone: ER3   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:08:22 UTC Type: Enhancement
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
Mock callback implementations none

Description Martin Weiler 2014-06-05 12:37:54 UTC
Description of problem:
During human task interaction, the UserGroupCallback's existsGroup, existsUser and getGroupsForUser methods are called redundantly. R

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


How reproducible:
Always


Steps to Reproduce:
1. Create a process with a human task
2. Create a custom UserGroupCallback implementation
3. Create a process instance and step through it

Actual results:
Redundant calls into the custom UserGroupCallback implementation from UserGroupCallbackTaskCommand1:

Start Process (while user task node is executed) 
------------------------------------------------
existsUser is called 4 times
existsGroup is called 1 time

Start Task
----------
existsUser is called 6 times
getGroups is called 7 time

Complete Task
-------------
existsUser is called 2 times
getGroups is called 3 time


Expected results:
The aforemnetioned methods are only call when needed, and only once per invocation

Additional info:

Comment 1 Martin Weiler 2014-06-05 12:50:02 UTC
Created attachment 902528 [details]
Mock callback implementations

Attaching mock callback implementations which log the method calls. Steps to reprocude:

- Copy the customcallback.jar file into business-central.war\WEB-INF\lib

- Replace org.jbpm.kie.services.cdi.producer.JAASUserGroupInfoProducer with com.sample.IhtLDAPUserGroupInfoProducer in business-central.war\WEB-INF\beans.xml under <alternatives> tag.

- Create a simple process containing a human task and step through it

- Watch the logging output and count the number of method invocations

Comment 3 Jiri Svitak 2015-01-27 15:35:30 UTC
Verified in BPM Suite 6.1.0.ER4.

QE test coverage:
https://gitlab.mw.lab.eng.bos.redhat.com/bxms/brms/commit/2aa310a11673aea5f6a82e9c2051a56daafd4799