6 Replies Latest reply on Apr 29, 2014 6:29 AM by jinalu

    jbpm org.drools.persistence.info.SessionInfo what is saved in rulesByteArray

    jinalu

      Hi,

      I'm investigating some jbpm issues at the moment and for that I need to know what is persisted org.drools.persistence.info.SessionInfo rulesByteArray blob. For example what is saved when timer intermediate event starts?

      Using jbpm 5.3.0-Final version.

      Thanks a lot in advance

        • 1. Re: jbpm org.drools.persistence.info.SessionInfo what is saved in rulesByteArray
          marco.rietveld

          The SessionInfo class stores the kie-/knowledgesession information. The rulesByteArray field contains a serialized/marshalled ksession -- if you're using Drools (standalone or with jBPM), then the state of the knoeldge session is saved in this field.

           

          If you're using pure jBPM, then the field isn't interesting -- but it's necessary to making everything work.

           

          The state of a jBPM process instance is saved in the ProcessInstanceInfo.rulesByteArray field. When a timer intermediate (catch) event is started, then nothing is saved, as far as I know, in that field. The session itself is saved in that field when the process instance hits a "save point" or completes, which would happen after the timer intermediate (catch) event.

          • 2. Re: jbpm org.drools.persistence.info.SessionInfo what is saved in rulesByteArray
            jinalu

            Yes, I'm using drools plus service mix. I'm searching for place where could be  next step after timer handler java instance saved. When saving session or work item or whatever is persistent jbpm doesn't save exact java instances to the blob?

            • 3. Re: jbpm org.drools.persistence.info.SessionInfo what is saved in rulesByteArray
              marco.rietveld

              No, please see the Drools and jBPM documentation for more information:

               

              jBPM docs: http://docs.jboss.org/jbpm/v6.0.1/userguide/jBPMPersistence.html

               

              In particular, Section 8.1.1.1 Binary persistence, will help you.

              • 4. Re: jbpm org.drools.persistence.info.SessionInfo what is saved in rulesByteArray
                jinalu

                I would never ask the question if had found the answer in documentation. There is no information what is included in blob itself what is binary process state etc.

                • 5. Re: jbpm org.drools.persistence.info.SessionInfo what is saved in rulesByteArray
                  marco.rietveld

                  My apologies.

                   

                  The documentation says the following:

                   

                  "jBPM uses a binary persistence mechanism, otherwise known as marshalling, which converts the state of the process instance into a binary dataset. When you use persistence with jBPM, this mechanism is used to save or retrieve the process instance state from the database. The same mechanism is also applied to the session state and any work item states."

                   

                  I think I've lost sight of your question: what do you not understand or do you want to know?

                  • 6. Re: jbpm org.drools.persistence.info.SessionInfo what is saved in rulesByteArray
                    jinalu

                    No problem, Marco. Maybe my question was not clear enough. I'm trying to figure out what exactly is persisted. According to the org.drools.runtime.process.ProcessInstance description "A process instance represents one specific instance of a process that is currently executing.  Whenever a process is started, a process instance is created that represents that specific instance that was started.  It contains all runtime information related to that instance." And according your mentioned part from jbpm documentation it is saved and retrieved from database.

                    For example a have such jbpm process:

                    Start -> Step A (Using AWorkItemHandler) -> Step B (Using BWorkItemHandler) -> Timer (time intermediate event, wait for 5 minutes) -> Step C (Using CWorkItemHandler)

                    What I want to know what is persisted when timer event starts executing and what I will recover if the session will be closed during timer event execution.

                     

                    Thanks in advance