2 Replies Latest reply on May 14, 2010 12:44 PM by topiltzin

    jBPM 4.3, Spring 2.5, Oracle, start process, process instance have a null id

      When I try to start a new process instance, and then go to next state, the process instance its created
      as I can see it in the DataBase, but the ID of the process instance is null, I need some help, why is this happenning?

       

      The code:

       

      ProcessInstance processInstance = getExecutionService()
              .startProcessInstanceByKey(processDefinitionId);

       

      String processInstanceId = processInstance.getId();
      logger.debug("processInstanceId: " + processInstanceId);

       

      and ... processInstanceId is null as I can see in the DB, thanks in advance

        • 1. Re: jBPM 4.3, Spring 2.5, Oracle, start process, process instance have a null id
          mwohlf

          my guess is you forgot

           

          <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer" init="eager" />
          

           

          but this is hard to tell without seeing your complete configuration

          • 2. Re: jBPM 4.3, Spring 2.5, Oracle, start process, process instance have a null id

            Excellent, I was trying to solve this 2 days ago, thanks!!!

             

            As you said, I just add: <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer" init="eager" />

            to my jbpm.cfg.xml file

             

            Here is the configuration:

             

             

             

            {code:xml}

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

                <process-engine-context>
                    <repository-service />
                    <repository-cache />
                    <execution-service />
                    <history-service />
                    <management-service />
                    <identity-service />
                    <task-service />

                   
                    <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer"
                        init="eager" />


                    <command-service name="txRequiredCommandService">
                        <retry-interceptor />
                        <environment-interceptor />
                        <spring-transaction-interceptor />
                    </command-service>
                    <script-manager default-expression-language="juel"
                        default-script-language="juel"
                        read-contexts="execution, environment, process-engine, spring"
                        write-context="">
                        <script-language name="juel"
                            factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
                    </script-manager>
                    <authentication />
                    <id-generator />
                    <types resource="jbpm.variable.types.xml" />
                    <address-resolver />
                    <business-calendar>
                        <monday hours="9:00-12:00 and 12:30-17:00" />
                        <tuesday hours="9:00-12:00 and 12:30-17:00" />
                        <wednesday hours="9:00-12:00 and 12:30-17:00" />
                        <thursday hours="9:00-12:00 and 12:30-17:00" />
                        <friday hours="9:00-12:00 and 12:30-17:00" />
                        <holiday period="01/07/2008 - 31/08/2008" />
                    </business-calendar>
                </process-engine-context>
                <transaction-context>
                    <repository-session />
                    <db-session />
                    <message-session />
                    <timer-session />
                    <history-session />
                    <hibernate-session current="true" />
                    <transaction type="spring" />
                </transaction-context>
            </jbpm-configuration>

            {code}