|
Re: [ATL] how to use xsi:type in atl input model file [message #2959 is a reply to message #2940] |
Thu, 28 December 2006 08:43 |
Frédéric Jouault Messages: 572 Registered: July 2009 |
Senior Member |
|
|
Hello,
ATL does not directly handle XMI reading and writing but delegates these
tasks to the underlying model handler (e.g., EMF or MDR).
Therefore, in your case, you should rather refer to the XMI
specification implemented by EMF and/or ask this kind of EMF XMI-related
questions to the EMF people.
Note that you can also use the EMF reflective model editor, which let
you edit your model visually (with a tree-based syntax). If you do so,
you do not need to even care about the XMI: the editor generates some
file (it could even not be human-readable for that matters) that ATL
understands because both use EMF.
That said, my guess is that you should write: xsi:type="a:Task" (i.e.,
use "a" as prefix instead of "bpdm", which is the URI).
Regards,
Frédéric Jouault
brajesh K. wrote:
> Hello ,
>
> i am using xsi:type in my model input file. my sample input file is
> following.
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xmi:XMI xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI" xmlns:a="bpdm">
> <a:BusinessProcessDiagram Name="BusinessProcessDiagram1">
> <Pools Name="Pool1">
> <Process Name="Process">
> <GraphicalElements xsi:type="bpdm:Task" Name="task1"/>
> </Process>
> </Pools>
> </a:BusinessProcessDiagram>
> </xmi:XMI>
>
>
>
> where entity GraphicalElements has a EObject type.
> when i tried to run this using rule
> rule bpmn2bpel {
> from input : bpdm!BusinessProcessDiagram
>
> do {
> input.Name -> println();
>
> }
>
>
> }
>
>
> it gave error .
>
> An internal error occurred during: "Launching".
>
> java.lang.NullPointerException
> at
> org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:226)
>
> at
> org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:154)
>
> at
> org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:136)
>
> at
> org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .runAtlLauncher(AtlLaunchConfigurationDelegate.java:117)
>
> at
> org.atl.eclipse.adt.launching.AtlLaunchConfigurationDelegate .launch(AtlLaunchConfigurationDelegate.java:95)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:639)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:565)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:754)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlu gin.java:944)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
>
> when i removed <GraphicalElements> entry from model so it works fine.
> but i don't know why it is not working with <GraphicalElements> tag.
>
> pls help me.
>
> thanks in advance.
>
> Brajesh K.
>
|
|
|
|
Re: [ATL] how to use xsi:type in atl input model file [message #3043 is a reply to message #2993] |
Thu, 28 December 2006 10:53 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Brajesh,
The use of a prefix "bpdm" for which there is no corresponding xmlns
declaration seems very odd and doesn't seem like something that EMF
would produce; I'd expect it to use "a" since that's the prefix that has
been declared. In any case, if EMF is failing to read a resource, it
will produce an exception that explains why (and you can look at
Resource.getErrors/getWarnings to see all the things that have gone
wrong while loading), so if there is a problem reading (perhaps even a
bug), there must be a more informative exception (pointing into the XMI
code) than the stack trace in the scaffolding code you've shown...
brajesh K. wrote:
> Hi ,
> thanks for reply.
> i didn't create bpdm.ecore file manually , it is generating using EMF
> ecore editor. as you told , I tried to change bpdm(i.e URI) to a , but
> still it not works.
>
> as i told you <GraphicalElements> is a EObject reference which contain
> Task type object . below i describe actual hierachy.
>
> FlowObject +Name :Estring
>
> Activity -> FlowObject
> Task -> Activity
>
>
> Task extends Activity and , Activity extnds FlowObject.
> that's why i given GraphicalElements of type Task. <GraphicalElements
> xsi:type="a:Task">. but it still give an error.
>
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03378 seconds