org.yaoqiang.bpmn.model.elements.gateways.ExclusiveGateway Maven / Gradle / Ivy
package org.yaoqiang.bpmn.model.elements.gateways;
import org.yaoqiang.bpmn.model.elements.XMLAttribute;
import org.yaoqiang.bpmn.model.elements.core.common.FlowElements;
import org.yaoqiang.bpmn.model.elements.core.common.SequenceFlow;
/**
* ExclusiveGateway
*
* @author Shi Yaoqiang([email protected])
*/
public class ExclusiveGateway extends Gateway {
private static final long serialVersionUID = 4156339722251011079L;
public ExclusiveGateway(String name) {
this((FlowElements) null);
setName(name);
}
public ExclusiveGateway(FlowElements parent) {
super(parent, "exclusiveGateway");
setGatewayDirection(Gateway.GatewayDirection.Diverging.toString());
}
protected void fillStructure() {
XMLAttribute attrDefault = new XMLAttribute(this, "default");
super.fillStructure();
add(attrDefault);
}
public SequenceFlow getDefaultSequenceFlow() {
return (SequenceFlow) getParent().getFlowElement(get("default").toValue());
}
}