Community
Participate
Working Groups
Hi, According to the UML 2.2 Interface (from ProtocolStateMachines) has association: protocol: ProtocolStateMachine [0..1] Papyrus does not allow to create a state machine diagram for Interface. Reproduction: *) In Model Explorer create an Interface *) Right click the Interface in Model Explorer and from the popup menu select New Diagram > Create a new StateMachine Diagram *) An error message is displayed: It is not possible to create this diagram on the selected element. Workaround: *) Right click the interface and in the popup menu select New Child > Create a new ProtocolStateMachine *) Create the statemachine diagram for the new ProtocolStateMachine. *) In the Properties View for the interface select the Advanced tab, click the "Show Advanced Properties" button. *) Set the property Protocol to the ProtocolStateMachine.
Though the workaround is not clean because it creates a new statemachine under the protocol statemachine. However, the statemachine diagram shall be created directly under the protocol statemachine, i.e. creating the additional statemachine is not necessary.
Protocol state machines are not supported for the moment. Hence the strange behaviors and awkward workarounds.
OK, thank you for the answer.
(In reply to yirco from comment #3) > OK, thank you for the answer. It seems that this is still not the case in papyrus 1.0 ?
I can confirm that it is still not fixed (luna and mars). It should be easy to fix, I'll investigate in the next time.
A fix has been committed with ID 3cc3ec50082bbe0d43485fc904fca1c3087f6c70, (for master only, since there will be no further builds for Papyrus 1.0). The fix allows the creation of a protocol state-machine in the context of an interface. It also avoids that an additional nested state-machine is created, if a diagram is created on an existing protocol state-machine (see comment1). The fix is incomplete in the sense that restrictions of a protocol state machines are not checked (e.g. Papyrus allows to create entry actions).
Has been fixed, see comment 6