2 Replies Latest reply: Sep 20, 2012 3:24 AM by chandrasachin16 RSS

    Create new users in jBPM

    Ashish Kumar Newbie

      hello,

       

        I am using jBOSS jBPM 5.2 tool.But I am unable to create and define new users in that.Can anybody tell me in detail that how can I define new users in jBPM and how can I use them.Kindly mention in detail bcoz I am new to this tool.

       

      Thanks and Regards

        • 1. Re: Create new users in jBPM
          srujana pulipaka Newbie

          Hello Ashish

           

          You can create users and roles in two files LoadUsers.mvel and LoadGroup.mvel available in  jbpm-installer\task-service\target\org\jbpm

           

          and assign users-groups and users-passwords in roles.properties and users.properties files in jbpm-gwt-console-server.war\web-inf\classes

          • 2. Re: Create new users in jBPM
            chandrasachin16 Newbie

            Hi ,

             

            I tried with the same solution added a user group named "user"  in LoadGroups.mvel

             

            as follows

             

            groups = [ 'knightsTempler' : new Group( "Knights Templer" ),

                       'crusaders' : new Group( "Crusaders" ),

                       'HR' : new Group( "HR" ),

                       'PM' : new Group( "PM" ),

                       'sales' : new Group( "sales" ),

                       'user' : new Group( "user" )

                     ];

             

            return groups;

             

             

             

            Also added  the following in LoadUsers.mvel

             

             

            users = [ 'darth'  : new User('Darth Vader'), 

                      'bobba'  : new User( 'Bobba Fet'),     'jabba'      : new User('Jabba Hutt'),

                      'dalai'  : new User('Dalai Lama'),     'christoper' : new User('Christoper Columbus'),

                      'stuart' : new User('Stuart Little'),  'jane'       : new User('Jane Austin'),

                      'peter'  : new User('Peter Parker'),   'steve'      : new User('Steve Rogers'),

                      'sly'    : new User('Sly Stalone'),    'liz'        : new User('Elizabeth Windsor'),

                      'bruce'  : new User('Bruce Wayne' ),   'tony'       : new User('Tony Stark'),

                      'luke'   : new User('Luke Cage'),      'admin'      : new User('Administrator'),

                      'krisv'  : new User('krisv'),          'john'       : new User('john'),

                      'mary'   : new User('mary'),           'sales'      : new User('sales-rep'),

                      'sachin' : new User('sachin'),         'sachin1'    : new User('sachin1')

                    ];      

             

            return users;

             

            I added two users sachin and sachin1 but after restarting the server i was not able to login with the user sachin. I had added the same user in user.properties

             

            admin=admin

            krisv=krisv

            john=john

            mary=mary

            sales-rep=sales-rep

            sachin=sachin

            sachin1=sachin1

             

             

            and also done the changes in roles.properties

             

            admin=admin,manager,user

            krisv=admin,manager,user

            john=admin,manager,user,PM

            mary=admin,manager,user,HR

            sales-rep=admin,manager,user,sales

            sachin=user

            sachin1=user

             

             

            Need some help.

             

            Regards

            Sachin