5 Replies Latest reply on Dec 7, 2009 12:01 PM by optixpro

    why i can't use identityService in jbpm4

    optixpro

      i need to create user to workflow application by using IdentityService but i can't not run my application bacause it how error some thing about

      java.lang.NullPointerException


      or i need to create my own Identityservice to manage from my user database

      thankyou for help me

        • 1. Re: why i can't use identityService in jbpm4
          saraswati.santanu

          It will be helpful if you can provide a little more information. NullPointerException is too common and generic to come to any conclusion. Please provide the jbpm.cfg.xml, a snippet of the jpdl and a snippet of your code to execute that.

          Typically

          processEngine.getIdentityService()
          should give you the indentity service.

          • 2. Re: why i can't use identityService in jbpm4
            optixpro

             

            "saraswati.santanu" wrote:
            It will be helpful if you can provide a little more information. NullPointerException is too common and generic to come to any conclusion. Please provide the jbpm.cfg.xml, a snippet of the jpdl and a snippet of your code to execute that.

            Typically
            processEngine.getIdentityService()
            should give you the indentity service.


            jbpm.cfg.xml

            <?xml version="1.0" encoding="UTF-8" ?>
             <jbpm-configuration>
             <import resource="jbpm.default.cfg.xml" />
             <import resource="jbpm.businesscalendar.cfg.xml" />
             <import resource="jbpm.tx.hibernate.cfg.xml" />
             <import resource="jbpm.jpdl.cfg.xml" />
             <import resource="jbpm.identity.cfg.xml" />
            
             </jbpm-configuration>



            hibernate.cfg.xml

            <hibernate-configuration>
             <session-factory>
             <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
             <property name="hibernate.connection.driver_class">com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</property>
             <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb</property>
             <property name="hibernate.connection.username">root</property>
             <property name="hibernate.connection.password">root</property>
             <property name="hibernate.format_sql">true</property>
             <mapping resource="jbpm.repository.hbm.xml" />
             <mapping resource="jbpm.execution.hbm.xml" />
             <mapping resource="jbpm.history.hbm.xml" />
             <mapping resource="jbpm.task.hbm.xml" />
             <mapping resource="jbpm.identity.hbm.xml" />
             </session-factory>
             </hibernate-configuration>



            i try to create task condidates like jbpm4 dec(6.1.1)



            • 3. Re: why i can't use identityService in jbpm4
              optixpro

              if somebody know please help i try to follow in jbpm example but it not working for me now i'm so confusing why my class extends jbpmtestcase it work but if i don't it not working

              thank for help me

              • 4. Re: why i can't use identityService in jbpm4
                optixpro

                ok i can fix this

                • 5. Re: why i can't use identityService in jbpm4
                  optixpro

                  i try this

                  IdentityService identityService = processEngine.getIdentityService();
                  
                  String dept =identityService.createGroup("sales-dept");
                  identityService.createUser("johndoe", "johndoe", "John", "Doe");
                  identityService.createMembership("johndoe", "sales-dept");


                  but it not field password in database how can i do?