Book a Demo

Author Topic: Transitions and Triggers in hierarchical and parallel state machines  (Read 4998 times)

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
I refer to a transition as to be "an active source state is inactivated by the occurence of a trigger and a destination state becomes active."

Given a specific trigger, multiple transitions may happen. Usually they are documented on different state charts.

Question: How can I find all transition for a certain trigger, e.g. find all diagrams where the trigger is used?

I tried to name the transition connection after the trigger, but there is no diagram search for connections. Any other idea?
Rolf

PeterHeintz

  • EA Practitioner
  • ***
  • Posts: 1001
  • Karma: +59/-18
    • View Profile
Re: Transitions and Triggers in hierarchical and parallel state machines
« Reply #1 on: February 12, 2021, 10:45:30 pm »
Hi,
I had the same problem.
What I do, is dragging the trigger into the state machine diagram and adding a trace relation between the transition and the trigger.
Best regards,

Peter Heintz

ngong

  • EA User
  • **
  • Posts: 275
  • Karma: +2/-2
    • View Profile
Re: Transitions and Triggers in hierarchical and parallel state machines
« Reply #2 on: February 13, 2021, 02:43:23 am »
Thank you PeterHeintz, that surely would work. However it may not be as reliable. It depends on manual accuracy.

I found this link and adopted the solution:

Quote
select c.Name as Name, ce.Name as ClientName,  ce.Object_Type as ClientType, se.Name as SupplierName, se.Object_Type as SupplierType, dg.Name as diagram
from (((( t_connector c
left join t_object ce on ce.Object_ID = c.End_Object_ID )
left join t_object se on se.Object_ID = c.Start_Object_ID )
left join t_diagramlinks dl on dl.ConnectorID = c.Connector_ID)
left join t_diagram dg on dg.Diagram_ID = dl.DiagramID)
where c.Name ='<Search Term>'

Now I can see the names of diagrams hosting the connection named after the trigger.

As I am not fluent in SQL queries, I'd like to know whether it is possible to have the search result in a way that I can click on the diagrams name to open it.
Rolf

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Transitions and Triggers in hierarchical and parallel state machines
« Reply #3 on: February 13, 2021, 05:27:57 am »
The trick to be able to select result is to return the two magic fields

- CLASSGUID
- CLASSTYPE

This search for example returns the diagrams based on an element name

Code: [Select]
select distinct d.ea_guid as CLASSGUID,d.Diagram_Type as CLASSTYPE,d.name as Name ,package.name as PackageName ,package_p1.name as PackageLevel1,package_p2.name as PackageLevel2 ,package_p3.name as PackageLevel3
from ((((((t_diagram d
inner join t_diagramobjects do on do.Diagram_ID = d.Diagram_ID)
inner join t_object o on o.Object_ID = do.Object_ID)
inner join t_package package on d.package_id = package.package_id)
left join t_package package_p1 on package_p1.package_id = package.parent_id)
left join t_package package_p2 on package_p2.package_id = package_p1.parent_id)
left join t_package package_p3 on package_p3.package_id = package_p2.parent_id)
where o.name like '#WC#<Search Term>#WC#'
or o.ea_guid like '<Search Term>'

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Transitions and Triggers in hierarchical and parallel state machines
« Reply #4 on: February 13, 2021, 09:34:32 am »
You missed another buck ;-) Maybe you could add a donation button? Though I think that only few people actually would really make a donation...

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Transitions and Triggers in hierarchical and parallel state machines
« Reply #5 on: February 13, 2021, 04:48:36 pm »
You missed another buck ;-) Maybe you could add a donation button? Though I think that only few people actually would really make a donation...

q.
Yeah, and that is no problem. Donations are difficult in a corporate environment (you don't get an invoice for a donation, so how do you enter that into the bookkeeping?)

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Transitions and Triggers in hierarchical and parallel state machines
« Reply #6 on: February 13, 2021, 05:28:19 pm »
You missed another buck ;-) Maybe you could add a donation button? Though I think that only few people actually would really make a donation...

q.
Yeah, and that is no problem. Donations are difficult in a corporate environment (you don't get an invoice for a donation, so how do you enter that into the bookkeeping?)

Geert
Maybe you could describe it as a "retainer"?
That way you wouldn't have to deliver anything, specifically.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!