[
https://issues.apache.org/jira/browse/SCXML-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14112236#comment-14112236
]
Johannes Wienke commented on SCXML-205:
---------------------------------------
Ok, If I completely remove the suspicious call in the reset method by deleting
these lines:
{code:java}
if (!exctx.isRunning()) {
semantics.finalStep(exctx);
}
{code}
then still all tests pass perfectly.
> finalStep gets called twice
> ---------------------------
>
> Key: SCXML-205
> URL: https://issues.apache.org/jira/browse/SCXML-205
> Project: Commons SCXML
> Issue Type: Bug
> Affects Versions: 2.0
> Reporter: Johannes Wienke
> Priority: Critical
>
> In the current trunk version, finalStep and hence all onexit actions of the
> final state are called twice. The following scxml can be used to reproduce
> the problem.
> {code:xml}
> <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="Start"
> name="PublishEvent">
> <final id="Start">
> <onentry>
> <log expr="'Entering state Start'"></log>
> </onentry>
> <onexit>
> <log expr="'Leaving state Start'"></log>
> </onexit>
> </final>
> </scxml>
> {code}
> The onexit log message appears twice when running this example.
> I digged a bit in the source code and through a debugger I could find the
> cause for this effect: The finalStep method of SCXMLSemanticsImpl gets called
> twice. One backtrace looks like this:
> {noformat}
> SCXMLSemanticsImpl.finalStep(SCXMLExecutionContext) line: 215
> SCXMLSemanticsImpl.firstStep(SCXMLExecutionContext) line: 132
> SCXMLExecutor.reset() line: 331
> SCXMLExecutor.go() line: 318
> {noformat}
> and the seconds looks like this:
> {noformat}
> SCXMLSemanticsImpl.finalStep(SCXMLExecutionContext) line: 215
> SCXMLExecutor.reset() line: 334
> SCXMLExecutor.go() line: 318
> {noformat}
> I am not sure about what should be the correct behavior, but to my mind, the
> second call looks suspicious.
--
This message was sent by Atlassian JIRA
(v6.2#6252)