You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Yevgen Kogan <mi...@live.de> on 2011/05/09 17:16:52 UTC

[scxml] Issue with TransitionTargetComparator

Dear all,
 
the line 90 of the /commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/TransitionTargetComparator looks like this:
 
State s = (State) iter.next();
 
The cast to State causes an cast exception for my state machine, because some of my states are derived from Parallel. 
 
Now my question is, if the cast to State should be replaced with the cast to TransitionTarget or is it legal to assume that alle TransitionTargets in the method TransitionTargetComparator.compare(...)  are States (it would imply that my state machine is "brocken" ).
 
Thanks,
Eugen 		 	   		  

Re: [scxml] Issue with TransitionTargetComparator

Posted by Rahul Akolkar <ra...@gmail.com>.
On Mon, May 9, 2011 at 11:16 AM, Yevgen Kogan <mi...@live.de> wrote:
>
> Dear all,
>
> the line 90 of the /commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/TransitionTargetComparator looks like this:
>
> State s = (State) iter.next();
>
> The cast to State causes an cast exception for my state machine, because some of my states are derived from Parallel.
>
> Now my question is, if the cast to State should be replaced with the cast to TransitionTarget or is it legal to assume that alle TransitionTargets in the method TransitionTargetComparator.compare(...)  are States (it would imply that my state machine is "brocken" ).
>
<snip/>

Nested parallels (without intermediate states) are usually redundant,
but not illegal, so it may be better to fix the line as you suggest.
Please open a ticket in JIRA [1].

Meanwhile, you may either (a) change your state machine to remove such
nesting or (b) supply a custom semantics impl to the executor that
uses a comparator with the change.

-Rahul

[1] http://commons.apache.org/scxml/issue-tracking.html


> Thanks,
> Eugen

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org