Hi all.
I have an EMF model called "metamodel.ecore" and an instance for this model "ActionsFlow.xmi". In the metamodel, the container class is called "ActionsFlow" and there is a hierarchy like the following:
ActionsFlow (Entity)
|
|--- SequenceLink (Entity)
| |--- conditions (Attribute. List of "Condition")
| .
. .
.
.
The "Condition" entity is an EDataType ,which in turn is an instance of an external class called "Condition" too. This last class has two String attributes: 'code' and 'Description'. When saving the "ActionsFlow.xmi" model, I format the value for the condition like this "<ConditionDescription>ConditionCode". The next is a piece of the xmi file:
<?xml version="1.0" encoding="UTF-8"?>
<RegulatedInteractions:ActionsFlow xmi:version="2.0" xmlns:xmi="http ://www.omg.org/XMI" xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:RegulatedInteractions="http ://RegulatedInteractions/1.0">
<hasSeqRelation source="#//@hasInitialState" target="#//@hasAction.0">
<Condition><c1>myConditionCode1</Condition>
<Condition><c2>myConditionCode2</Condition>
</hasSeqRelation>
...
The fact is that when I try to generate the code, I get an error when reading the .xmi file (error is below). I would like to know if there is a way of customizing the parsing for the 'conditions' attribute of the "SequenceLink" class or instead, if there is a better way of treat this problems.
0 INFO WorkflowEngine - --------------------------------------------------------------------------------------
11 INFO WorkflowEngine - EMF Modeling Workflow Engine 1.1.1, Build v201108020506
11 INFO WorkflowEngine - (c) 2005-2009 openarchitectureware.org and contributors
13 INFO WorkflowEngine - --------------------------------------------------------------------------------------
13 INFO WorkflowEngine - running workflow: /Trabajo/workspace/org.xpand.example.gettingstarted/src/workflow/generator2.mwe
18 INFO WorkflowEngine -
480 INFO StandaloneSetup - Registering platform uri '/Trabajo/workspace'
3737 INFO CompositeComponent - Reader: Loading model from platform:/resource/org.xpand.example.gettingstarted/src/default2.regulatedinteractions
3917 ERROR WorkflowEngine - Workflow interrupted. Reason: Couldn't load resource under platform:/resource/org.xpand.example.gettingstarted/src/default2.regulatedinteractions : org.eclipse.emf.ecore.xmi.IllegalValueException: Value '<c1>myConditionCode1' is not legal. (platform:/resource/org.xpand.example.gettingstarted/src/default2.regulatedinteractions, 6, 51)
Thanks in advance!!