
org.yaoqiang.bpmn.engine.operation.SequenceFlowDestroyScope Maven / Gradle / Ivy
package org.yaoqiang.bpmn.engine.operation;
import java.util.logging.Logger;
import org.yaoqiang.bpmn.engine.runtime.Execution;
import org.yaoqiang.bpmn.model.elements.activities.SubProcess;
import org.yaoqiang.bpmn.model.elements.core.common.FlowNode;
/**
* SequenceFlowDestroyScope
*
* @author Shi Yaoqiang([email protected])
*/
public class SequenceFlowDestroyScope implements ExecutionOperation {
private static Logger log = Logger.getLogger(SequenceFlowDestroyScope.class.getName());
public void execute(Execution execution) {
Execution propagatingExecution = null;
FlowNode flowNode = execution.getFlowNode();
if (flowNode instanceof SubProcess) {
propagatingExecution = execution.getParent();
propagatingExecution.setFlowNode(flowNode);
propagatingExecution.setSequenceFlow(execution.getSequenceFlow());
propagatingExecution.setActive(true);
log.fine("destroy scope: scoped "+execution+" continues as parent scope "+propagatingExecution);
execution.remove();
} else {
propagatingExecution = execution;
}
propagatingExecution.performOperation(SEQUENCE_FLOW_TAKE);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy