}
}
private static void setConditionalSequenceFlow(Connection connection) {
IPeService peService = Graphiti.getPeService();
SequenceFlow flow = BusinessObjectUtil.getFirstElementOfType(connection, SequenceFlow.class);
Tuple<ConnectionDecorator, ConnectionDecorator> decorators = getConnectionDecorators(connection);
ConnectionDecorator def = decorators.getFirst();
ConnectionDecorator cond = decorators.getSecond();
if (flow.getConditionExpression() != null && flow.getSourceRef() instanceof Activity && def == null) {
ConnectionDecorator decorator = createConditionalConnectionDecorator(connection);
GraphicsAlgorithm ga = decorator.getGraphicsAlgorithm();
ga.setFilled(true);
ga.setForeground(manageColor(connection, StyleUtil.CLASS_FOREGROUND));
ga.setBackground(manageColor(connection, IColorConstant.WHITE));
} else if (cond != null) {
peService.deletePictogramElement(cond);
}
peService.setPropertyValue(connection, IS_CONDITIONAL_FLOW_PROPERTY,
Boolean.toString(flow.getConditionExpression() != null));
}