aasm-diagram icon indicating copy to clipboard operation
aasm-diagram copied to clipboard

Filter State Machine based on Guard Conditions

Open divyanshud opened this issue 5 years ago • 2 comments

We wanted to generate the state transition diagram only for 1 of my guard conditions as we have multiple guard conditions and we don't want the diagram for all the guard condition transition.

event :move_to_abc do
        transitions from: :xyz, to: :abc, guards: :guard1?
        transitions from: :mno, to: :abc, guards: :guard2?
        transitions from: :pqr, to: :abc, guards: :guard3?
 end

So we have to generate different diagram for every guards i.e. guard1, guard2, guard3

divyanshud avatar Feb 03 '20 11:02 divyanshud

For my part, I would be happy to just see the name of the guard. I suppose it would get a bit tricky if you define a do block instead of using the declarative form? Anybody else interested in working on this?

dstuebe avatar Sep 15 '20 19:09 dstuebe

I'd be happy to merge a pull request supporting guard conditions.

Katee avatar Mar 30 '21 04:03 Katee