[ 
https://issues.apache.org/jira/browse/SCXML-105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12662735#action_12662735
 ] 

Rahul Akolkar commented on SCXML-105:
-------------------------------------

This behavior is actually by design, though somewhat subtle. Since any 
transitions on the state machine are supposed to be atomic operations, the 
status is not updated until all the necessary steps to complete the transition 
are done without any fatal errors. This includes the executable content onexit 
of source state, in transition and onentry of target state. However, finding 
out the parent transition target (state) for actions within an onentry block is 
fairly straightforward -- in Action#execute(), the 
Action#getParentTransitionTarget() method will give the parent transition 
target if needed.


> Current status updated after onentry is called
> ----------------------------------------------
>
>                 Key: SCXML-105
>                 URL: https://issues.apache.org/jira/browse/SCXML-105
>             Project: Commons SCXML
>          Issue Type: Bug
>    Affects Versions: 0.9
>            Reporter: Mike Tillberg
>            Priority: Minor
>             Fix For: 0.10
>
>         Attachments: custom-state-01.xml, CustomActionTest.patch, 
> GetStateAction.java
>
>
> When retrieving the current state using a custom action in the onentry 
> section of a state, the state is incorrect.  The state retrieved is the 
> previous state.  The problem appears to be in SCXMLExecutor.triggerEvents, 
> where updateStatus() is called after semantics.executeActions().  Adding an 
> additional updateStatus() before executeActions() seems to fix the problem, 
> and all tests still pass.
> Attached is a test case showing the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to