@Override
public void deleteProcessInstance() {
RuntimeService runtimeService = engine.getRuntimeService();
try {
runtimeService.deleteProcessInstance(processInstanceId, null);
} catch (ProcessEngineException e) {
throw new InvalidRequestException(Status.NOT_FOUND, e, "Process instance with id " + processInstanceId + " does not exist");
}
}