Book a Demo

Author Topic: UML statemachine, list triggers  (Read 3864 times)

AlecJames

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
UML statemachine, list triggers
« on: December 04, 2013, 04:03:40 am »
I'm a UML / EA novice.

I have created a statemachine and I want to find a way to list all of the triggers with guards and effects in a simple table of triggers.
(I want a check list of triggers that I have to create in my application.)

Is there a screen / subset of a property sheet for this somewhere?
I've searched but cannot find.
Thanks
EA Corporate 15.2

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: UML statemachine, list triggers
« Reply #1 on: December 04, 2013, 06:48:18 am »
Hi,

there are some possibilities:
1. Write a SQL query
    - Thomas Kilians e-book is a great help (InsideEA)
    - Queries allow you to get almost every information from your repository / model. Therefore it's often useful to master this feature
2. Other Views of Statemachine / Statechart
    - Right Click on the diagram canvas
    - Statechart editor
    - choose between state next state, state trigger and trigger state
    - Export Statechart to csv file

By the way: If you want to use queries just ask. It's an easy task for someone who knows EA and SQL. The query results are easily to export in *.csv format.

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: UML statemachine, list triggers
« Reply #2 on: December 04, 2013, 08:37:16 am »
You can view your state machine in List View (Diagram/Show../List...). You can copy/paste the shown elements.

Of course Helmuts approach will give you more control over the results.

q.

AlecJames

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: UML statemachine, list triggers
« Reply #3 on: December 04, 2013, 09:36:47 pm »
Thanks for the suggestions.

For the SQL approach I'll have to get the book.  I think I need to know the EA object model (if thats what it is called) so I know how to reference my diagram in the project and what the triggers table is called?
Do I do something like this in an rtf template:
SELECT * FROM <triggers table> WHERE <triggerstable.referernce_to_my_diagram_in_project = the_diagram_I_am_intetrested_in>

--------------------------

For the Diagram->Show->List I see states but no triggers.  Am I missing an option to show triggers in the list?

A
EA Corporate 15.2

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: UML statemachine, list triggers
« Reply #4 on: December 04, 2013, 10:29:22 pm »
You will only see what is actually in the diagram. So if you did not put them there (which is not unlikely) you will not see them in the list. The approach is some kind of a fast approach for what you need. You might create a state diagram containing all elements. That could give you a quick solution.

Regarding the object model: yes, that's what you need. Since you are looking for elements of a state machine you would need something like this:
Code: [Select]
SELECT t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE,t_object.Name AS Object, t_object.Object_Type AS [Type], t_object.Stereotype FROM t_object WHERE t_object.Object_Type = "Trigger"  and t_object.ParentID = <Object_ID of the State Machine>
Have a look in my Inside book. The free sample shows in the beginning how to issue such a SQL.
q.
« Last Edit: December 04, 2013, 10:30:42 pm by qwerty »