0 Replies Latest reply on Sep 29, 2015 3:10 AM by srinu1985btech

    Is it Possible unsuspend process with another process cusom service task

    srinu1985btech

      Hi, i am suspending one process using below code

       

          System.out.println("suspended process instanceid:   :"+processInstance.getId());

          SuspendProcessInstanceCommand susp=new SuspendProcessInstanceCommand();

          susp.setProcessInstanceId(processInstance.getId());

          ksession.execute(susp);

          System.out.println("state :"+ProcessInstance.STATE_SUSPENDED+ " processstate: "+ksession.getProcessInstance(processInstance.getId()).getState());  

          Assert.assertEquals(ProcessInstance.STATE_SUSPENDED, ksession.getProcessInstance(processInstance.getId()).getState());

       

       

      My reqirement i need unsuspend with anorher Process service task. for Unsuspend i am using below code

            String proeccinstanceid = (String) workItem.getParameter("processInstanceID");

            System.out.println("process instance id: "+ proeccinstanceid);

            System.out.println("before suspend State:   "+ProcessInstance.STATE_ACTIVE+"  process "+ksession.getProcessInstance(Long.parseLong(proeccinstanceid)).getState());

            ResumeProcessInstanceCommand res=new ResumeProcessInstanceCommand();

            res.setProcessInstanceId(Long.parseLong(proeccinstanceid));

            ksession.execute(res);

       

      But it is not working. Any one please Suggest me