Hello,
I'm trying to transform BPMN to UML AD. the below code shows the rule to transform BPMN Loop Task to UML AD loop node:
rule LoopTask2LoopNode{
from
loopTask : BPMN!Activity (loopTask.activityType = #Task and loopTask.looping=true and loopTask.oclIsTypeOf(BPMN!Activity))
to
loopAction: UMLAD!OpaqueAction(
activity <- thisModule.parentActivity ,
name <- loopTask.name,
inStructuredNode <- loopNode
),
loopNode: UMLAD!LoopNode(
name <- loopTask.name + ' Container',
activity <- thisModule.parentActivity
)
}
this code runs and generate the below XMI representation for UML AD:
<node xmi:type="uml:LoopNode" xmi:id="_RQAGTVBmEd-g1ckxeVXZeg" name="8 Container" isTestedFirst="true">
<node xmi:type="uml:OpaqueAction" xmi:id="_RQAGTFBmEd-g1ckxeVXZeg" name="8" outgoing="_RQAGSFBmEd-g1ckxeVXZeg" incoming="_RQAGR1BmEd-g1ckxeVXZeg"/>
</node>
but my UML2 tools can't generate the loop node from this XML.
I found that when I create the loop node manually, its XMI representation should be represented using the <group > tag rather than <node > tag, so the above XMI should be
<group xmi:type="uml:LoopNode" xmi:id="_RQAGTVBmEd-g1ckxeVXZeg" name="8 Container" isTestedFirst="true">
<node xmi:type="uml:OpaqueAction" xmi:id="_RQAGTFBmEd-g1ckxeVXZeg" name="8" outgoing="_RQAGSFBmEd-g1ckxeVXZeg" incoming="_RQAGR1BmEd-g1ckxeVXZeg"/>
</group>
I dont know if this is a metamode problem or if there is a way to force the generated XMI to use the <group > tag.
Thank you,
Mohamed Shalaby