State Fragments are doubled

Hello,
I tried to retrieve the list of functions used in an Exchanged Scenario Diagram, but the functions are doubled in the result of the aql expression I’m using:
(self being a Scenario - Exchange Scenario, not the diagram itself)
aql: self.ownedInteractionFragments->filter(interaction::InteractionState)
Result:
InteractionState 1
InteractionState 1
InteractionState 2
InteractionState 2
InteractionState 3
InteractionState 3
… etc
Note that InteractionState with the same name have a different id, but point toward the same Function:
Is it expected to have twice the number of State Fragment in the model ?

Error.PNG
Error2.PNG
Error3.PNG
Error.PNG
Error2.PNG
Error3.PNG

For the model question I have no clue.
But to remove duplicates from you expression you can use ->asOrderedSet() for instance:
self.ownedInteractionFragments->filter(interaction::InteractionState).relatedAbstractFunction->asOrderedSet()

I figured what was the issue.
While I don’t know what those “Interaction States” are, the elements I was looking for were actually “StateFragment”, which are not duplicated.
But thanks anyway, I had no idea that “asOrderedSet” was removing the duplicates !

Mathias,
If that helps, you’ll find in the embedded Capella help a complete reference of the Acceleo Query Language used in M2Doc.
Stéphane

Copyright © Eclipse Capella, the Eclipse Capella logo, Eclipse and the Eclipse logo are Trademarks of The Eclipse Foundation.