Generated model in bad format [message #1414768] |
Mon, 01 September 2014 09:07 |
behnaz changizi Messages: 11 Registered: January 2014 |
Junior Member |
|
|
Hi,
I have a small set of ATL rules to refine a BPMN2.0 model into another BPMN2.0 model.
The problem I encounter is that the nested elements are shown in a wierd format.
For instance a Process inside a definition appears as:
<rootElements xsi:type="bpmn2:Process" id="process_1" name="Default Process">
rather than
<bpmn2:Process id="process_1" name="Default Process">
Also the namespace are not shown properly in the header part of xml. So instead of
the generated output has the following format:
<xmi:XMI xmi:version="2.0" xmlns:xmi="xxx" xmlns:xsi="xxx" xmlns:bpmn2=xxx>
rather than
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="xxx" xmlns:bpmn2="xxx" xmlns:bpmndi="xxx" xmlns:dc="xxx" xmlns:di=" xxx" id="Definitions_1" targetNamespace="xxx">
The followings are my ATL rules, the BPMN20 ecore matamodel, the input and the output file. I am using the BPMN2.0 ecore from eclipse.org/bpmn2-modeler.
Does anyone have an idea what might be wrong?
Many thanks in advance,
Behnaz
--@nsURI bpmn2=xxx
module b2b;
create OUT: bpmn2out from IN: bpmn2;
rule transaction {
from
t : bpmn2!Transaction
to
b : bpmn2out!Transaction(name <- t.name, id <- t.id)
}
rule process {
from
t : bpmn2!Process
to
c : bpmn2out!Process(name <- t.name, id <- t.id
, supports <- t.supports
, processType <- t.processType
, flowElements <- t.flowElements
)
}
rule definition {
from
t : bpmn2!Definitions(not false)
to
c : bpmn2out!Definitions(id <- t.id
,rootElements <- t.rootElements
, diagrams <- t.diagrams
)
}
rule baseElement {
from
t : bpmn2!BaseElement(not t.oclIsTypeOf(bpmn2!Definitions) and
not t.oclIsTypeOf(bpmn2!Process) and not t.oclIsTypeOf(bpmn2!Transaction)
and not t.oclIsKindOf(bpmn2!Event) and not t.oclIsKindOf(bpmn2!EventDefinition)
and not t.oclIsKindOf(bpmn2!Task) and not t.oclIsKindOf(bpmn2!FlowElement))
to
c : bpmn2out!BaseElement(id <- t.id)
}
rule startEvent {
from
a : bpmn2!StartEvent
to
d : bpmn2out!StartEvent(name <- a.name)
}
rule endEvent {
from
a : bpmn2!EndEvent
to
d : bpmn2out!EndEvent(name <- a.name)
}
rule task {
from
a : bpmn2!Task
to
d : bpmn2out!Task(name <- a.name)
}
rule sequenceFlow {
from
a : bpmn2!SequenceFlow
to
d : bpmn2out!SequenceFlow(name <- a.name)
}
rule cancelEventDefinition {
from
a : bpmn2!CancelEventDefinition
to
d : bpmn2out!CancelEventDefinition(id <- a.id)
}
P.S. I had to remove URL in order to post my message. Please see the attachments.
-
Attachment: sn.atl
(Size: 1.43KB, Downloaded 350 times) -
Attachment: process_1.bpmn
(Size: 5.87KB, Downloaded 384 times) -
Attachment: o.bpmn
(Size: 0.94KB, Downloaded 298 times) -
Attachment: BPMN20.ecore
(Size: 255.71KB, Downloaded 262 times)
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02367 seconds