3 Replies Latest reply on Nov 16, 2005 3:17 AM by koen.aers

    Does process-state work without Hibernate?

    shuchan

      Hello experts,

      Because persistence is NOT necessary in my jBPM 3.0 environment,
      I would like NOT to use libraries for Hibernate.

      However I got the following exception if using process-state:

      va.lang.NoClassDefFoundError: org/hibernate/HibernateException
       at org.jbpm.graph.node.ProcessState.read(ProcessState.java:51)
       at org.jbpm.jpdl.xml.JpdlXmlReader.readNodes(JpdlXmlReader.java:194)
       at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:130)
       at org.jbpm.graph.def.ProcessDefinition.parseXmlReader(ProcessDefinition.java:145)
       at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:136)
       at sample.crane.SampleMain.createDefinition(SampleMain.java:52)
       at sample.crane.SampleMain.start(SampleMain.java:32)
       at sample.crane.SampleMain.main(SampleMain.java:2)
      


      Looking at the ProcessState#read, it calls a method of JbpmSession, which imports Hibernate's
      classes as follows:

      org.jbpm.graph.node.ProcessState#read(ProcessState.java:51)
       public void read(Element processStateElement, JpdlXmlReader jpdlReader) {
       ...snipped...
       JbpmSession jbpmSession = JbpmSession.getCurrentJbpmSession();
      


      [Question]
      Is it the specification of jBPM 3.0 that using process-state requires JbpmSession/Hibernate?


      Thanks,
      shu

        • 1. Re: Does process-state work without Hibernate?
          koen.aers

          Shu,

          The process-state reads the latest definition of a particular process. Hence the dependency on Hibernate. How do you want to use this? I mean, how would you specify what the subprocess in memory is that a process-state has to load?

          Regards,
          Koen

          • 2. Re: Does process-state work without Hibernate?
            shuchan

            Hi Koen,

            Thanks for your reply!

            I mean, how would you specify what the subprocess in memory is that
            a process-state has to load?


            I would like to specify a parent process and a subprocess in separate
            jpdl files(two files) and load/call the subprocess from the parent
            process(process-state).

            Is there any way to do that without using Hibernate libaries and
            accessing database?

            Thanks,
            shu

            • 3. Re: Does process-state work without Hibernate?
              koen.aers

              Well, there is no in-memory repository (yet) to hold processdefinitions of different jpdl files that get loaded at runtime. This may be added in the future because it will probably be needed in the context of doing webflow with jbpm. In the meantime, you could use the combination of the in-memory hsqldb with hibernate to achieve this effect already now. It is not the most efficient way to this, but if you can live with the initialization of the hibernate stuff during startup it should be okay.

              Regards,
              Koen