1 Reply Latest reply on Nov 30, 2012 6:39 PM by Thomas Setiabudi

    How to undo/rollback a stage in workflow

    Pooja Arora Newbie

      Hi

       

      Our application (using JBPM 5.1.0 final+ Hibernate+Spring), deployed on tomcat 6.0.26 gets an issue where sometimes when user completes a stage next stage does not become active.

       

      We are unable to find out reason behind the same. So, to give a workaround we tried to rollback last operation performed by user.

       

      We are taking below steps for te same :

       

      1) Moving that Task into Ready state so that it can be claimed again

       

      Update task set status = 'Ready', ActualOwner_id = null where id = <task-id>

       

      2)We have audit tables for processinstanceinfo and WORKITEMINFO. So we also rollback last state into these tables.

       

      So I am updating these three tables :

      Task, processinstanceinfo, WORKITEMINFO

       

       

      After this when we claim a task, JBPM completes it without any error but still it doesn't create the next stage.

       

      Please clarify us with this issue and below set of queries.

       

      Our application create workflow subprocess at every state. Just wanted to understand when does a new entry get added/removed from processinstanceinfo?

      AM I missing any other table which needs to be updated ?

        • 1. Re: How to undo/rollback a stage in workflow
          Thomas Setiabudi Expert

          Hi Pooja Arora,

           

          It is an interesting requirement you have there, I have similar requirement too.

           

          I have not try to implement this, but I think it should be better if we provide a re-entry point in the process such as using signal event or even using ad hoc process where we can signal which task node that we want to do at any point of the process.

          Maybe using this approach we can avoid interacting with the JBPM Database directly and let the engine handle all the states and data.

           

          Or have you find a solution for this? If so, I would like to hear how you solve this since I have similar requirement...

           

          Regards,

          Thomas Setiabudi