String label = ((FlowElement) getBaseElement(bpmnEdge.getBpmnElement())).getName();
// line.setLineType(LineType.ConditionalFlow);
SvgLineTo line = new SvgLineTo();
SequenceFlow sequenceFlow = (SequenceFlow) getBaseElement(bpmnEdge.getBpmnElement());
line.setLineType(LineType.SequenceFlow);
if (sequenceFlow.getConditionExpression() != null) {
line.setLineType(LineType.ConditionalFlow);
}
if (sequenceFlow.getTargetRef() instanceof Activity) {
Activity activity = (Activity) sequenceFlow.getTargetRef();
if (activity.getDefault() != null && activity.getDefault().equals(sequenceFlow)) {
line.setLineType(LineType.DefaultFlow);
}
}
if (sequenceFlow.getTargetRef() instanceof Gateway) {
if (sequenceFlow.getTargetRef() instanceof ComplexGateway) {
ComplexGateway complexGateway = (ComplexGateway) sequenceFlow.getTargetRef();
if (complexGateway.getDefault() != null && complexGateway.getDefault().equals(sequenceFlow)) {
line.setLineType(LineType.DefaultFlow);
}
// ExclusiveGateway //InclusiveGateway
}
if (sequenceFlow.getTargetRef() instanceof ExclusiveGateway) {
ExclusiveGateway exclusiveGateway = (ExclusiveGateway) sequenceFlow.getTargetRef();
if (exclusiveGateway.getDefault() != null && exclusiveGateway.getDefault().equals(sequenceFlow)) {
line.setLineType(LineType.DefaultFlow);
}
// ExclusiveGateway //InclusiveGateway
}
if (sequenceFlow.getTargetRef() instanceof InclusiveGateway) {
InclusiveGateway inclusiveGateway = (InclusiveGateway) sequenceFlow.getTargetRef();
if (inclusiveGateway.getDefault() != null && inclusiveGateway.getDefault().equals(sequenceFlow)) {
line.setLineType(LineType.DefaultFlow);
}
// ExclusiveGateway //InclusiveGateway
}