public void addBendpoint(IAddBendpointContext context) {
super.addBendpoint(context);
try {
FreeFormConnection connection = context.getConnection();
BaseElement element = (BaseElement) BusinessObjectUtil.getFirstElementOfType(connection, BaseElement.class);
ModelHandler modelHandler = ModelHandlerLocator.getModelHandler(getDiagram().eResource());
Point p = DcFactory.eINSTANCE.createPoint();
p.setX(context.getX());
p.setY(context.getY());
BPMNEdge edge = (BPMNEdge) modelHandler.findDIElement(getDiagram(), element);
int index = context.getBendpointIndex() + 1;
edge.getWaypoint().add(index, p);
if (index == 1) {
AnchorUtil.reConnect((BPMNShape) edge.getSourceElement(), getDiagram());
} else if (index == connection.getBendpoints().size()) {