BPMN model API

Hey guys,

I’m usind the model API (https://docs.camunda.org/manual/7.3/guides/user-guide/#bpmn-model-api) for developing.
I would like to navigate through my model and simplify it. Is it possibile to get all outgoing nodes via API, that I can Loop over the whole graph? Another Point, which is important for my simplification is to delete nodes and sequences. Is there a function for this? I can not find any one in the Manual.

Thanks for your help

Hi JohnSmith,

For traversing the graph, the interface org.camunda.bpm.model.bpmn.instance.FlowNode has the methods #getOutgoing and #getIncoming to retrieve the connected sequence flows and from there you can reach the connected activities.

Regarding removal, I am afraid there is currently no convenience method.