Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358695

Summary: [StateMachine Diagram Editor] Not possible to create a statemachine diagram for interface
Product: [Modeling] Papyrus Reporter: yirco <netswengineer>
Component: CoreAssignee: Ansgar Radermacher <ansgar.radermacher>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: klaas.gadeyne
Version: 0.8.1   
Target Milestone: ---   
Hardware: All   
OS: Windows XP   
Whiteboard:

Description yirco CLA 2011-09-23 05:02:23 EDT
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.
Comment 1 yirco CLA 2011-09-23 07:53:39 EDT
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.
Comment 2 David Servat CLA 2011-09-27 05:11:59 EDT
Protocol state machines are not supported for the moment. Hence the strange behaviors and awkward workarounds.
Comment 3 yirco CLA 2011-09-27 14:05:19 EDT
OK, thank you for the answer.
Comment 4 Klaas Gadeyne CLA 2015-04-22 09:50:13 EDT
(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 ?
Comment 5 Ansgar Radermacher CLA 2015-04-24 11:09:11 EDT
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.
Comment 6 Ansgar Radermacher CLA 2015-05-05 09:30:51 EDT
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).
Comment 7 Ansgar Radermacher CLA 2015-06-16 08:20:28 EDT
Has been fixed, see comment 6