Package io.zeebe.model.bpmn.traversal
Class ModelWalker
- java.lang.Object
-
- io.zeebe.model.bpmn.traversal.ModelWalker
-
public class ModelWalker extends Object
Walks the elements of aBpmnModelInstance
and invokes the providedModelElementVisitor
for every element.The following order is guaranteed (anything that is not listed here is not guaranteed):
- An element is visited only after its parent has been visited (top-down)
- An element's child is visisted before any not yet visited sibling (depth-first)
We can add more constraints to this as we see fit (e.g. certain BPMN elements in the same scope can be visited in a defined order to make transformation more convenient)
Depth-first is nice for transformation so we can have some kind of stack with transformation state.
-
-
Constructor Summary
Constructors Constructor Description ModelWalker(BpmnModelInstance modelInstance)
-
-
-
Constructor Detail
-
ModelWalker
public ModelWalker(BpmnModelInstance modelInstance)
-
-
Method Detail
-
walk
public void walk(ModelElementVisitor visitor)
-
-