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");
}
}