Class ModelWalker


  • public class ModelWalker
    extends Object
    Walks the elements of a BpmnModelInstance and invokes the provided ModelElementVisitor 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.