Remove Boundary Event Programatically

Hi,

How to remove Intermideate/boundary event from a notation (Task) programatically.

image

thanks
vijay

Duplicate of Remove Intermediate/Boundary Event?