Bug 810285

Summary: jbpm-human-task.war: users and groups MVEL files are mandatory, should be optional
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Jiri Locker <jlocker>
Component: jBPM ConsoleAssignee: Kris Verlaenen <kverlaen>
Status: VERIFIED --- QA Contact: Jiri Locker <jlocker>
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GACC: kverlaen
Target Milestone: ---   
Target Release: BRMS 5.3.0.GA   
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:

Description Jiri Locker 2012-04-05 14:20:39 UTC
Description of problem:
Every time jbpm-human-task.war is deployed it reads LoadGroups.mvel and LoadUsers.mvel files and add the users and groups to the task service session. This is no problem as long as hbm2ddl.auto=create and schema is re-created during deployment. However, when hbm2ddl.auto=update or hbm2ddl is turned off, the attempt to add the set of groups and users results in SQL exception (unique constraint broken).

Currently those two files cannot be removed, because task service servlet requires they are present on classpath. My workaround is that they "return [:]", it should be possible to remove them completely.

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

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:
When task service is deployed (not for the first time and hbm2ddl is off), it fails with SQL exception, because it tries to add duplicate users and groups. The users and groups files cannot be simply removed.

Expected results:
Task service should start if the users and groups files are not present

Additional info:

Comment 1 Maciej Swiderski 2012-04-06 08:54:54 UTC
Pull request ready to allow clean management of user/group creation.
https://github.com/droolsjbpm/jbpm/pull/77

Comment 2 Ryan Zhang 2012-04-23 07:36:58 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 3 Jiri Locker 2012-04-25 14:01:17 UTC
Verified in ER6.

Due to this fix users and groups read from the users/groups files are no longer added to the task session if they already exist (warning is logged in that case). Additionally, the change introduced when fixing bug 800508 allows to use different users/groups files or to omit them completely by using empty init parameters load.users and load.groups.

These two changes allow the task service to continue working with already populated database, e.g. after server restart. Thank you!