1 Reply Latest reply on Dec 1, 2006 10:45 AM by jerzy stachera

    Effects of saving a process instance

    Brad O'Hearne Newbie

      When I save a process instance:


      I am curious about the actual effect of that. Keeping in mind that the transaction on the jbpmContext is not committed until a jbpmContext.close() is invoked, what actually happens when this process instance is saved? Does it take a snapshot of the business process at the exact moment the save is done, and its committed later, or does it merely flag the context to save the state of the process instance when the transaction commits?

      Following, what if I perform the save statement twice in a business process before the transaction commits when the context is closed? Am I getting two different snapshots of the processs instance at different times, or am I pragmatically getting just the last state of that instance saved? Or from another perspective, is there more data available about the process instance if I save it once at the beginning of execution and once at the end, or is it the same as if I save it only once? And if I save the process instance only once, will the data saved be different if I save it at the beginning of my business process execution vs. at the end of execution, since the jbpmContext commits after everything, when the process is complete?

      Thanks for your help.