2 Replies Latest reply on Sep 10, 2012 11:31 AM by hansi007

    how i can  continue the execution of a previous instance in jbpm5

    lifegood

      hi,

       

      (in jbpm5) i have process contain two script tasks i need to execute one and save process instance and in another day i need to laod the process instance

       

      and execute the remaining tasks

       

      how i can do it

        • 1. Re: how i can  continue the execution of a previous instance in jbpm5
          jsvitak

          Hello,

          you can use the process persistence to persist the state of your session to database and then load the process session on another day. It depends how you want to pause the flow of your business process - persistence works only in safe points, you can use timer or your own service task for that. Or you may simply split your workflow into two business processes. The second process can be supplied with the variables which can be used from the previous business process.

           

          Regards

          Jiri Svitak

          1 of 1 people found this helpful
          • 2. Re: how i can  continue the execution of a previous instance in jbpm5
            hansi007

            Another option could be to remember the work_item / work_item_id that you stopped at without completing it. Than you can continue that process by completing that workitem:

             

            int workitemId = ... //From the work item that you remembered.
            StatefulKnowledgeSession ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, config, env );
            WorkItemManager wManager =  ksession.getWorkItemManager();
            wManager.completeWorkItem(workitemId,null);
            
            1 of 1 people found this helpful