Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mdt-papyrus.dev] Activity Diagram Pins

Hello,

Montages team is actually working on the bug #346706 "Add missing activity actions".

Thanks to restored code-generation for ActivityD (**) the addition of the actions itself is quite straightforward, but we have some questions about the pin's for a newly added actions.

Here is our basic understanding of the context:
- for both inputs and outputs, only the containment features has to be mapped to some child node in gmfgen, while derived unions AND non-containment references should not be mapped.
- The InputPin metaclass has 2 specializations in UML, namely ValuePin and ActionInputPin.
- None of the two specializations is ever directly referenced by any feature, all features always are of type InputPin
- UML does not have any restrictions of using any of the InputPin specializations, while some combinations for some actions does not look good (***)
- fortunately for ActivityD implementors OutputPin does not have specializations :)

The actual state of ActivityD is shown at google sheet [2] which is open for comments from everyone.

Here the green actions (rows 4-39) are available in Luna SR1, yellow actions (rows 40+) are to be added in Mars. The columns B and C shows available pin-related containment/reference features, columns D-F shows available node mappings.
Green cells are good, red cells are bad, yellow cells are to be decided.

We can guess that there were 2 different attempts to solve the above complexity:

A: "Map Everything" - to add all 3 possible GMF mappings for every qualifying containment feature
- this correctly shows imported models or models created without the diagram
- user can create any specialized type of InputPin
- user has to choose correct InputPin subtype at palette

B: "Map Once" - map only the simplest InputPin
- this still correctly shows the imported models, including those with ValuePin's, because ValuePin extend InputPin
- user can only create InputPins
- attempt to create ValuePin via dedicated palette entry does not work

case B is represented as a red cells in the columns E/F

Note that green cell only means that the corresponding mapping is present in the GMFGen, it does not mean that everything works as expected :)
E.g, for CallOperationAction the #target is mapped, but #argument is always used from the diagram
E.g, we haven't found a way to create any pins for SendObjectAction
There may be other problem cases for existing actions, for now we were just focusing on what is mapped at all.

Note that the sheet also shows a few other problems:
- some features are not mapped at all, e.g AddStructuralFeatureValueAction#insertAt, the whole columns E/F or G are red in the table
- LoopNode#bodyOutput at cell [G17] is special case we don't understand at all
- - it is the only mapped non-containment
- - even if there was some intention behind this, user can't actually create #bodyOutput pin for LoopNode
- - if there was intention behind this, it should probably be implemented for other non-containments, e.g. LoopNode#decider
- - may be it is related that creation of LoopNode#loopVariable output pin fails (Bugzilla XXX)
- for some actions / pins there is also some synchronization logic implemented but we don't want to touch this topic for now

So the questions here are:
- does anybody care? :)
- is there any logic we missed behind the choice A vs B?
- what would you suggest as a choice A vs B for newly added actions for Mars?
- whatever the choice, should we enforce it for all existing ActivityD actions?

[1] "Add missing actions" bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=346706
** -- note, that regeneration of the ActivityD is still waiting for some gerrits to be merged for Mars. But we at least can run it internally.
*** -- e.g, TestIdentityAction#first vs #second, should not they be of the same specialization type?

Regards,
Michael

--

Michael "Borlander" Golubev
Eclipse Committer (GMF, UML2Tools)
at Montages Think Tank, 
Prague, Czech Republic
1165/1 Dvorecka, 14700, Prague-4 Podoli

tek: +420 602 483 463


Back to the top