0 Replies Latest reply on Jul 16, 2007 6:46 AM by Adrian Dimulescu

    persisting process after every single node

    Adrian Dimulescu Newbie


      IIUC, a process instance is actually persisted when entering a wait node or finishing.

      I have a process with non-wait (action) nodes that may last very long (hours) themselves. They are calls to remote clusters so while long, they are not resource-hungry. There is a business need to trace process execution from step to step and I wonder if there are some good practices to follow on this issue.

      If I simply do, in each action :

      executionContext.getJbpmContext().save(executionContext.getProcessInstance()); executionContext.getJbpmContext().getSessionFactory().getCurrentSession().flush();

      nothing happens as the transaction does not commit until the first wait state.

      Ideally I would like to save in the database the process after each and every node. My case is an "enterprise" jBPM deployed on JBoss.

      Thank you,