Add waypoint to BpmnEdge

Hi,
I need to add an waypoint to the BpmnEdge of a SequenceFlow, don’t know how to initialize an waypoint, I want to use this:

bpmnEdge.insertElementAfter(elementToInsert, insertAfterElement);

Thanks

I found the solution from other topics

Hi @manda091x,

Could you explain how you solved it? It could help others who have the same problem.

Cheers,
Miklas

1 Like

Hi @Miklas,
here is my code:

Waypoint wp = modelInstance.newInstance(Waypoint.class);
wp.setX(x);
wp.setY(y);
bpmnEdge.insertElementAfter(wp, secondWaypoint);

Cheers