cancel
Showing results for 
Search instead for 
Did you mean: 

suspendProcessInstanceById not updating database

fabio_resner
Champ in-the-making
Champ in-the-making
Hello,

I'm not sure if I'm forgeting something.
I have a method that does the following:


public void suspendProcessInstance(String processInstanceId) {
      ProcessEngineHolder.getInstance().getProcessEngine().getRuntimeService().suspendProcessInstanceById(processInstanceId);
      
      ProcessInstance processInstance = ProcessEngineHolder.getInstance().getProcessEngine().getRuntimeService().createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
      
      assert(processInstance.isSuspended());
   
   }


And I also have a method that starts a instance of the process and calls the suspendProcessInstance() method.
While the test result is positive, it does not update ACT_RU_EXECUTION.

SUSPENSION_STATE_ remains the same.
Is there any special condition to call suspendProcessInstanceById?

Thanks,
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
There are no special conditions. Are you sure the transaction is comitted? Because we have thorough testing for the suspend/activate behaviours…