Book a Demo

Author Topic: Combining Triggers in StateDiagrams  (Read 3048 times)

martin.graf

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • U de dSchnägä sisi au Raubtier........
    • View Profile
Combining Triggers in StateDiagrams
« on: February 20, 2008, 01:02:39 am »
I defined various triggers which represent SPS signals. How do I define guards in state diagrams so that a transition only occurs if (Trigger1 && not Trigger2) ?
Could I visualize this in a StateMachineDiagram?

Thanks!


Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Combining Triggers in StateDiagrams
« Reply #1 on: February 20, 2008, 07:37:22 pm »
Are you sure you want to model it this way? I think it would be hard to understand (transitions with guards which refer to triggers).

I'd rather use pseudostates (junctions) and simple guards (like "false") to model such conditions.

martin.graf

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • U de dSchnägä sisi au Raubtier........
    • View Profile
Re: Combining Triggers in StateDiagrams
« Reply #2 on: February 20, 2008, 08:12:28 pm »
No I'm not :-)
Your suggestion sounds much better.... (But results in much bigger diagrams)
Do you know a way to refer Triggers defined in a seperate folder?

Tanks anyway

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: Combining Triggers in StateDiagrams
« Reply #3 on: February 20, 2008, 09:11:56 pm »
Unfortunately triggers are only reusable on the level where they have been defined. You can define substates and everything, but you have to place all diagrams on top state machine level in order to see all triggers.

With complex state machines this leads to a long flat list of diagrams and pseudostates, of course. When I complained about this Sparx support agreed that this behaviour is deplorable and said they had filed a feature request in my name to make triggers visible in subpackages.

I don't know if this has been done for the 7.1. beta. I didn't see anything in the feature list and haven't installed it yet. Maybe somebody knows.