Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.scxml
Interface SCXMLSemantics

All Known Implementing Classes:
  SCXMLSemanticsImpl

public interface SCXMLSemantics

The purpose of this interface is to separate the interpretation algorithm from the `SCXMLExecutor` and therefore make it pluggable.

Semantics agnostic utility functions and common operators as defined in UML can be found in the `SCXMLHelper` or attached directly to the SCXML model elements. Some of the possible semantic interpretations are, for example:

- STATEMATE
- RHAPSODY
- ROOMCharts
- UML 1.5
- UML 2.0

Specific semantics can be created by subclassing `org.apache.commons.scxml.semantics.SCXMLSemanticsImpl`.

Method Summary
`void` | `determineInitialStates(SCXML input, Set states, List entryList, ErrorReporter errRep, SCInstance scInstance)` Determining the initial state(s) for this state machine.
`void` | `enumerateReachableTransitions(SCXML stateMachine, Step step, ErrorReporter errRep)` Enumerate all the reachable transitions.
`void` | `executeActions(Step step, SCXML stateMachine, EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance)` Executes all OnExit/Transition/OnEntry transitional actions.
`void` | `filterTransitionsSet(Step step, EventDispatcher evtDispatcher, ErrorReporter errRep, SCInstance scInstance)` Filter the transitions set, eliminate those whose guard conditions are not satisfied.
`void` | `followTransitions(Step step, ErrorReporter errorReporter, SCInstance scInstance)` Follow the candidate transitions for this execution Step, and update the lists of entered and exited states accordingly.
`void` | `initiateInvokes(Step step, ErrorReporter errRep, SCInstance scInstance)` Initiate any new invoked activities.
`SCXML` | `normalizeStateMachine(SCXML input, ErrorReporter errRep)` Optional post processing immediately following Digester.
`void` | `processInvokes(TriggerEvent[] events, ErrorReporter errRep, SCInstance scInstance)` Forward events to invoked activities, execute finalize handlers.
`void` | `updateHistoryStates(Step step, ErrorReporter errRep, SCInstance scInstance)` Go over the exit list and update history information for relevant states.

Method Detail

### normalizeStateMachine

    public SCXML normalizeStateMachine(SCXML input,
                                       ErrorReporter errRep)

  Optional post processing immediately following Digester. May be used for removing pseudo-states etc.

  Parameters:
    `input` - SCXML state machine
    `errRep` - ErrorReporter callback
  Returns:
    normalized SCXML state machine, pseudo states are removed, etc.

### determineInitialStates

    public void determineInitialStates(SCXML input,
                                       Set states,
                                       List entryList,
                                       ErrorReporter errRep,
                                       SCInstance scInstance)
                                throws ModelException

  Determining the initial state(s) for this state machine.

  Parameters:
    `input` - SCXML state machine
    `states` - a set of States to populate
    `entryList` - a list of States and Parallels to enter
    `errRep` - ErrorReporter callback
    `scInstance` - The state chart instance
  Throws:
    `ModelException` - in case there is a fatal SCXML object model problem.

### executeActions

    public void executeActions(Step step,
                               SCXML stateMachine,
                               EventDispatcher evtDispatcher,
                               ErrorReporter errRep,
                               SCInstance scInstance)
                        throws ModelException

  Executes all OnExit/Transition/OnEntry transitional actions.

  Parameters:
    `step` - provides EntryList, TransitList, ExitList gets updated its AfterStatus/Events
    `stateMachine` - state machine - SCXML instance
    `evtDispatcher` - the event dispatcher - EventDispatcher instance
    `errRep` - error reporter
    `scInstance` - The state chart instance
  Throws:
    `ModelException` - in case there is a fatal SCXML object model problem.

### enumerateReachableTransitions

    public void enumerateReachableTransitions(SCXML stateMachine,
                                              Step step,
                                              ErrorReporter errRep)

  Enumerate all the reachable transitions.

  Parameters:
    `stateMachine` - a state machine to traverse
    `step` - with current status and list of transitions to populate
    `errRep` - ErrorReporter callback

### filterTransitionsSet

    public void filterTransitionsSet(Step step,
                                     EventDispatcher evtDispatcher,
                                     ErrorReporter errRep,
                                     SCInstance scInstance)
                              throws ModelException

  Filter the transitions set, eliminate those whose guard conditions are not satisfied.

  Parameters:
    `step` - with current status
    `evtDispatcher` - the event dispatcher - EventDispatcher instance
    `errRep` - ErrorReporter callback
    `scInstance` - The state chart instance
  Throws:
    `ModelException` - in case there is a fatal SCXML object model problem.

### followTransitions

    public void followTransitions(Step step,
                                  ErrorReporter errorReporter,
                                  SCInstance scInstance)
                           throws ModelException

  Follow the candidate transitions for this execution Step, and update the lists of entered and exited states accordingly.

  Parameters:
    `step` - The current Step
    `errorReporter` - The ErrorReporter for the current environment
    `scInstance` - The state chart instance
  Throws:
    `ModelException` - in case there is a fatal SCXML object model problem.

### updateHistoryStates

    public void updateHistoryStates(Step step,
                                    ErrorReporter errRep,
                                    SCInstance scInstance)

  Go over the exit list and update history information for relevant states.

  Parameters:
    `step` - The current Step
    `errRep` - ErrorReporter callback
    `scInstance` - The state chart instance

### processInvokes

    public void processInvokes(TriggerEvent[] events,
                               ErrorReporter errRep,
                               SCInstance scInstance)
                        throws ModelException

  Forward events to invoked activities, execute finalize handlers.

  Parameters:
    `events` - The events to be forwarded
    `errRep` - ErrorReporter callback
    `scInstance` - The state chart instance
  Throws:
    `ModelException` - in case there is a fatal SCXML object model problem.

### initiateInvokes

    public void initiateInvokes(Step step,
                                ErrorReporter errRep,
                                SCInstance scInstance)

  Initiate any new invoked activities.

  Parameters:
    `step` - The current Step
    `errRep` - ErrorReporter callback
    `scInstance` - The state chart instance

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2006 The Apache Software Foundation. All Rights Reserved.