Problem/Motivation
Currently, StateItem::isTransitionAllowed() calls StateItem::getTransitions() which results in state transition guards being invoked for all the possible transitions.
This to me is a bug since the attempt here is to only check that the passed transition is allowed, not ALL of them, patch to follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3344193-5.patch | 2.48 KB | jsacksick |
Comments
Comment #2
jsacksick commentedComment #4
jsacksick commentedOk, so I didn't realize that the new workflow method that was made public as part of #3344193: StateItem::isTransitionAllowed() should only check that the passed transition is allowed doesn't check if the transition is possible, so I documented that.
The code is a little bit less clean with these changes... But considering guards could hold expensive logic, I really don't think it makes sense to invoke them for transitions that the caller doesn't intent to apply... So I still think this is the right thing to do.
Comment #5
jsacksick commentedComment #7
jsacksick commentedStill feeling a bit ambivalent about this, but... still decided to go ahead.
Comment #8
claudiu.cristeaNo sure this change is correct.
Comment #9
jsacksick commentedWhy is that? Care to elaborate?