Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » AM3 » Interesting problem
Interesting problem [message #580186] Sun, 15 August 2010 01:09 Go to previous message
Transformed is currently offline Transformed
Messages: 21
Registered: June 2010
Junior Member
Hi all,
I have an ecore model with Process class containing variable class with Variables association name and partnerLink class with partnerLinks association name as shown below.

|--{Variables}--> |variable|
|Process| <composite>
|--{partnerLinks}--> |partnerLink|

The respective XMI instance looks like this

<BPEL:Process xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"name="ManRoleType" targetNameSpace="http://abc.com">
<variables name="POChannelInstance"/>
<variables name="CPUnotInStock"/>
<partnerLinks name="CustRoleType"/>
<partnerLinks name="SupCPURoleType"/>
</BPEL:Process>


I am using AM3 extractor to generate an XML document which looks like this

<process >
<partnerLinks>
<partnerLink name=CustRoleType />
<partnerLink name=SupCPURoleType/>
</partnerLinks>

<varilables>
<varilable name= POChannelInstance/>
<varilable name= CPUnotInStock/>
</varilables>
</process>

Now, my problem is how can I specify those relationnames namely partnerLinks and variables into as an Element of XML.

Following ATL code does not help.

rule Process2Root{
from
s : BPEL!Process
to
t : XML!Root(
name <- 'process',
children <- Sequence{xmlns, name, partnerLinks}
),
xmlns : XML!Attribute(
name <- 'xmlns',
value <- 'http://docs.oasis-open.org/wsbpel/2.0/process/executable'
),

name : XML!Attribute(
name <- 'name',
value <- s.name ),
partnerLinks: XML!Element(
name <- 'partnerLinks'
)
}

rule prtnerlinks2Elements (
from s: BPEL!PartnerLinks <!-- This is error now as BPEL metamodle does not have PartnerLinks as class -->
)

How should I work out to make partnerLinks and variables as elemtents that contains partnerlink and variable respectively?

Thanks
 
Read Message
Read Message
Previous Topic:Interesting problem
Next Topic:KM3 <-> Ecore probelm
Goto Forum:
  


Current Time: Fri May 24 14:50:32 EDT 2013

Powered by FUDForum. Page generated in 0.02364 seconds