Package org.jbpm.pvm.internal.migration

Source Code of org.jbpm.pvm.internal.migration.AbortMigrationHandler

package org.jbpm.pvm.internal.migration;

import org.jbpm.api.ExecutionService;
import org.jbpm.api.ProcessDefinition;
import org.jbpm.api.ProcessInstance;
import org.jbpm.pvm.internal.env.EnvironmentImpl;


public class AbortMigrationHandler implements MigrationHandler {

  public void migrateInstance(ProcessDefinition newProcessDefinition, ProcessInstance processInstance, MigrationDescriptor migrationDescriptor) {
    ExecutionService executionService = EnvironmentImpl.getFromCurrent(ExecutionService.class);
    if (executionService == null) return;
    executionService.endProcessInstance(processInstance.getId(), "aborted");
  }

}
TOP

Related Classes of org.jbpm.pvm.internal.migration.AbortMigrationHandler

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.