All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.camunda.bpm.engine.impl.test.ProcessEngineAssert Maven / Gradle / Ivy

There is a newer version: 7.23.0-alpha2
Show newest version
package org.camunda.bpm.engine.impl.test;

import junit.framework.AssertionFailedError;

import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.engine.runtime.ProcessInstance;

public class ProcessEngineAssert {
  
  public static void assertProcessEnded(ProcessEngine processEngine, String processInstanceId) {
    ProcessInstance processInstance = processEngine
      .getRuntimeService()
      .createProcessInstanceQuery()
      .processInstanceId(processInstanceId)
      .singleResult();
    
    if (processInstance!=null) {
      throw new AssertionFailedError("expected finished process instance '"+processInstanceId+"' but it was still in the db"); 
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy