Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.0
-
None
Description
I discovered a tricky bug in SCXMLSemanticsImpl#macroStep where it doesn't comply with the SCXML specification, part 3.13, which defines the following rules (among many others):
- A macrostep is a series of one or more microsteps ending in a configuration where the internal event queue is empty [...]
- After completing a macrostep, the SCXML Processor must execute in document order the <invoke> handlers [...]
The tricky bug is that the current implementation does check for internal events first, but only processes the first event!
In case of more than 1 internal event, the invoke handlers will be executed before (thereafter) processing any remaining internal events.
The SCXML IRP Tests didn't catch/test this condition, and it only in special scenarios will actually make a difference.
I'll add a dedicated test for this, and then apply a fix proving it.