Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Serialization order: derived references versus own references
Serialization order: derived references versus own references [message #1111019] Tue, 17 September 2013 16:55 Go to next message
Robert Neßelrath is currently offline Robert NeßelrathFriend
Messages: 14
Registered: April 2013
Junior Member
Hi,

I have a problem with correctly serializing an emf model that describes a scxml document. The image shows the relevant model part for my question:
index.php/fa/16226/0/

Now I have the problem, that a if-else structure isn't serialized correctly:

<if cond="movie_id == 1300854">
          <else>
            <assign expr="2" name="movie_id"/>
          </else>
          <assign expr="1" name="movie_id"/>
        </if>


The reason is, that the last "assign", that is content of the If-class supertype "ExecutableContent" is serialized last. This leads to an illegal scxml-structure. Is there a was to influence the behaviour of the serializer?

Thanks,
Robert
  • Attachment: Unbenannt.JPG
    (Size: 28.94KB, Downloaded 274 times)

[Updated on: Tue, 17 September 2013 20:41]

Report message to a moderator

Re: Serialization order: derived references version own references [message #1111036 is a reply to message #1111019] Tue, 17 September 2013 17:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Robert,

I see feature maps are involved, so I assume it's an XML Schema-based
model. In general, when you have features that delegate to feature
maps, the feature map will maintain the overall mixed order of those
feature's value, so if you populate the model in the wrong order, it
will be captured that way in the feature map and serialized in the
feature map's order. So, if you set the assign feature before you set
the else feature, you should get the order you want. You can always
manipulate the feature map directly...


On 17/09/2013 6:55 PM, Robert Neßelrath wrote:
> Hi,
>
> I have a problem with correctly serializing an emf model that describes a scxml document. The image shows the relevant model part for my question:
>
>
> Now I have the problem, that a if-else structure isn't serialized correctly:
>
> <if cond="movie_id == 1300854">
> <else>
> <assign expr="2" name="movie_id"/>
> </else>
> <assign expr="1" name="movie_id"/>
> </if>
>
> The reason is, that the last "assign", that is content of the If-class supertype "ExecutableContent" is serialized last. This leads to an illegal scxml-structure. Is there a was to influence the behaviour of the serializer?
>
> Thanks,
> Robert


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Serialization order: derived references version own references [message #1111679 is a reply to message #1111036] Wed, 18 September 2013 15:11 Go to previous message
Robert Neßelrath is currently offline Robert NeßelrathFriend
Messages: 14
Registered: April 2013
Junior Member
Thank you, I found a solution for my problem. The model was not schema-based but your tip helped me to find the problem. I forgot to add the content of the derived class "else if" and "else" to the feature map. Know everything is in the right order.
Previous Topic:Is EMF suited for what I am trying to accomplish?
Next Topic:[cdo] CDOID
Goto Forum:
  


Current Time: Fri Apr 26 19:49:19 GMT 2024

Powered by FUDForum. Page generated in 0.03375 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top