Contexts and Data Scopes

From Educational Exercises and Activities Community Group

Data scopes from which data can be stored and accessed, e.g. from event handlers, could be as per:

1. global variables

2. automata

var scope = [...].getAutomatonById('automaton1').getAutomatonScope();
scope.variable = 7;

3. subgraphs or automata regions which contain the current node

var scope = [...].getAutomatonById('automaton1').getContainingRegionScopeById('region2');
scope.variable = 7;

4. the current node

var scope = [...].getAutomatonById('automaton1').getCurrentNodeScope();
scope.variable = 7;

5. local function variables