State diagram and guard conditions

Please use this forum for open discussions about Bouml.
Merci d'utiliser ce forum pour des discussions ouvertes à propos de Bouml.

State diagram and guard conditions

Postby mbenson » Tue 20 Feb 2018 20:17

I'm evaluating BOUML for a project so I created a demo project, primarily to generate state machine source code in C++. I got it working fairly quickly, but I have a problem regarding transitions with guard constraints. Do all transitions require triggers, or does BOUML support null transitions with guard constraints and no trigger? I've used other modeling tools that generated code that reevaluated all "null" transitions (no trigger) against a guard constraint when the activity executed. When I try this myself, the generated code doesn't evaluate the guard until a trigger is evaluated. Any trigger. So my sample application did not perform the transition I expected, but when I called a trigger that should have been an illegal transition, then it evaluated the guard constraint and transitioned.

For example:

StateA -> trigA -> StateB
StateB -> guard_condition == 1 -> StateC

When in StateB with guard_condition == 0 ...
1. trigA() /* Does nothing, as expected.
2. guard_condition = 1.
3. doActivity() /* Does nothing. */
4. trigA() /* Should do nothing, but this causes the machine to evaluate guard_condition == 1, and transitions to StateC.

Are null transitions (no trigger, guard conditions) supported? If so, what am I doing wrong?
Posts: 3
Joined: Tue 20 Feb 2018 19:54

Re: State diagram and guard conditions

Postby Bruno Pagès » Tue 20 Feb 2018 20:45


The state machine generator is mainly a prototype given as an example of what can be done with a plug-out, in the version I deliver several features of the state machines are not managed.

So to answer to your question only the transitions with triggers are managed, and in fact the way to activate a possible next step is to apply an operation named by a trigger on the state machine ;)

The state machine generator can be modified/augmented by any users, its model is part of the distributed package like for the other non-manual plug-outs, it is implemented in C++, only the HTML generator is implemented in C++ and Java.

Some details are given in the reference manual
ImageAuthor of Bouml
Bruno Pagès
Posts: 689
Joined: Mon 20 Feb 2012 09:23
Location: France

Return to Open discussions / Discussions ouvertes

Who is online

Users browsing this forum: No registered users and 1 guest