Serialization order: derived references versus own references [message #1111019] |
Tue, 17 September 2013 16:55 |
Robert Neßelrath 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:
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
[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 |
Ed Merks 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/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03375 seconds