Wodel applied to BPMN. [Simple BPMN Ecore]

[High-level change operations for BPMN].

Insert activity [bpmn]:

    s = select one Sequence where {^to not typed EndEv}
    f = select one FlowObject in s->^to
    a = create Activity with {name = 'newActivity'}
    modify s with {^to = a}
    create Sequence with {name = 'newSeq', ^from = a, ^to = f}

Remove activity [bpmn]:

    a = select one Activity
    s0 = select one Sequence where {^to = a and ^from <> null}
    s1 = select one Sequence where {^from = a and ^to <> null}
    o = select one FlowObject where {self = s1->^to}
    s2 = select one Sequence where {^from = o and ^to <> null}
    modify s0 with {^to = o}
    modify s1 with {^from = o, ^to = a}
    modify s2 with {^from = a}

Move activity [bpmn]:

    a = select one Activity
    s0 = select one Sequence where {^to = a and ^from <> null}
    s1 = select one Sequence where {^from = a and ^to <> null}
    o = select one FlowObject where {self = s1->^to}
    s2 = select one Sequence where {^from = o and ^to <> null}
    modify s0 with {^to = o}
    modify s1 with {^from = o, ^to = a}
    modify s2 with {^from = a}

Replace activity [bpmn]:

    a0 = select one Activity
    src0 = select one Sequence where {^to = a0}
    tar0 = select one Sequence where {^from = a0}
    a1 = select one Activity where {self <> a0}
    src1 = select one Sequence where {^to = a1}
    tar1 = select one Sequence where {^from = a1}
    modify src0 with {^to = a1}
    modify tar0 with {^from = a1}
    modify src1 with {^to = a0}
    modify tar1 with {^from = a0}

Retype activity [bpmn]:

    retype one [StartEv, IntermediateEv, EndEv] as [Activity]

Retype gateway [bpmn]:

    retype one [AND, OR, XOR] as [AND, OR, XOR]

Here you can download all these examples of Wodel applied to BPMN.
BPMN samples .zip
BPMN samples .tar.gz

Acknowledgements

This work has been funded by the Spanish Ministry of Science (RTI2018-095255-B-I00, project "MASSIVE") and the R&D programme of Madrid (P2018/TCS-4314, project "FORTE").