I have created my metamodel, called WFG.ecore
.
With ATL I managed to transform a bpmn2 file in a WFG model. The ATL transformation gives to the object WorkFlow
, that is the container of all the other objects in WFG.
Now I would like to modify the object WorkFlow
programmatically in Java, but I can not.
How can I delete an object instance from its container, and so from all the occurrences?
Below there is an example with instances
gateways
+--------->+----------+
| |Gateway_1 |
♦ +----------+
+-----------+ ^
|WorkFlow_1 | | nextGateway 0..1
+-----------+ |
♦ +---------+
| | Node_1 |
+---------->+---------+
nodes
I would like to delete the instance Gateway_1
, so that it's no more contained in WorkFlow_1
, and so that Node_1.getNextGateway->null
. I tried to do
WorkFlow_1.getGateways().remove(Gateway_1)
but doesn't work