/[Apache-SVN]
ViewVC logotype

Revision 374981


Jump to revision: Previous Next
Author: rahul
Date: Sun Feb 5 08:07:00 2006 UTC (18 years, 4 months ago)
Changed paths: 2
Log Message:
Turn off a flat document variable context and turn on per state contexts as now required by the SCXML WD.

Some of the important side-effects brought around by this change are:

1) Variable resolution now bubbles up from local state up to document root.

2) For efficiency, contexts are created only on demand i.e. a state that has no variable declarations of its own does not need a context to store variables and one is not instantiated.

3) The two points above combine to give us an exception for (2) -- an ancestor state which doesn't have variable declarations but one or more of the states in its document subtree do, i.e. in this SCXML document (ASCII art warning)

             root
         /          \
       foo          bar
   /       \       /      \
foo1     foo2     bar1*    bar2

if bar1 is the only state with variable declarations, bar and bar1 are guaranteed to have Contexts instantiated for them via the SCInstance (and the others are guaranteed to not have Contexts instantiated). bar1 since it needs a context for its variables, and a blank context in bar is essential for the recursion in variable resolution.

4) Going one step further, contexts are instantiated only if the owner state is visited in the course of the execution of the state machine. Thus, if the state bar1 above is never visited for a particular execution, then no contexts will be instantiated.



Changed paths

Path Details
Directoryjakarta/commons/sandbox/scxml/branches/STATELESS_MODEL/src/main/java/org/apache/commons/scxml/env/jexl/JexlEvaluator.java modified , text changed
Directoryjakarta/commons/sandbox/scxml/branches/STATELESS_MODEL/src/main/java/org/apache/commons/scxml/env/jsp/ELEvaluator.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26