@SuppressWarnings("rawtypes")
public AbstractFlowNodeBuilder connectTo(String identifier) {
ModelElementInstance target = modelInstance.getModelElementById(identifier);
if (target == null) {
throw new BpmnModelException("Unable to connect " + element.getId() + " to element " + identifier + " cause it not exists.");
}
else if (!(target instanceof FlowNode)) {
throw new BpmnModelException("Unable to connect " + element.getId() + " to element " + identifier + " cause its not a flow node.");
}
else {
FlowNode targetNode = (FlowNode) target;
connectTarget(targetNode);
return targetNode.builder();