You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Ate Douma (JIRA)" <ji...@apache.org> on 2014/04/03 09:19:19 UTC

[jira] [Commented] (SCXML-196) Redefine SCXMLSemantics to align with the Algorithm for SCXML Interpretation as described in the SCXML specification

    [ https://issues.apache.org/jira/browse/SCXML-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13958594#comment-13958594 ] 

Ate Douma commented on SCXML-196:
---------------------------------

The new definition and implementation of the SCXMLSemantics by SCXML-196 also automatically resulted in some further  separation of concerns for the SCXMLExecutor, SCInstance and SCXMLExecutionContext, which 'fitted well' with the goals for this issue.
While those changes have been committed against SCXML-196, I'm describing the high-level changes here.

The SCXMLExecutor now is completely 'detached' from both SCInstance and SCXMLExecutionContext, and only holds a reference to the SCXMLSemantics and SCXMLExecutionContext itself.

Functionally, the SCXMLExecutor now is reduced to be only a 'driver' providing the public (user) interface for executing SCXML based state machines, and receiving events to do so.

Behind this public executor facade, the SCXMLExecutionContext now manages everything except the external event queue and driving the SCXMLSemantics.
The state machine processing through the SCXMLSemantics is driven by the SCXMLExecutor providing it the SCXMLExecutionContext as input.

The SCInstance now hold all and only the state machine persistable state, and can be 'detached' and 're-attached' in the SCXMLExecutionContext (serviced through the SCXMLExecutor).

The default SCXMLSemantics implementation is fully stateless and invoked from the SCXMLExecutor through only three main entry points: firstStep, nextStep and finalStep, taking the SCXMLExecutionContext as parameter. 

With these changes in SCXML-196 and SCXML-197, the goals for Milestone 1 on the roadmap to SCXML 2.0 have been completely met and I'll create a milestone 1 svn tag for it shortly.


> Redefine SCXMLSemantics to align with the Algorithm for SCXML Interpretation as described in the SCXML specification
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: SCXML-196
>                 URL: https://issues.apache.org/jira/browse/SCXML-196
>             Project: Commons SCXML
>          Issue Type: New Feature
>    Affects Versions: 2.0
>            Reporter: Ate Douma
>            Assignee: Ate Douma
>             Fix For: 2.0
>
>
> One of the targets for the Commons SCXM 2.0 roadmap milestone 1 is to redefine SCXMLSemantics to align with the SCXML Algorithm for SCXML Interpretation, see: http://www.w3.org/TR/scxml/#AlgorithmforSCXMLInterpretation
> The current SCXMLSemantics interface and its implementation is so much different from the algorithm in the specification that 'molding' it into what the algorithm now expects is too cumbersome.
> The current SCXMLSemantics and its implementation will therefore be completely replaced with a new one, closely corresponding to the semantics of the SCXML Algorithm in the specification.
> The algorithm described in the specification leaves plenty of room for optimization and choice of techniques.
> For a first cut implementation though I intend to simply follow the described algorithm as close as possible, also to make sure not to deviate from the specification already too early :)
> After the new implementation has been tested and validated to be conforming the expected behavior, or even later than that, the implementation surely can be refined and optimized further.
> The changes needed for this task are closely related to those described in SCXML-197: Better separation of concern between SCXMLExecutor and SCInstance and introducing a new SCXMLExecutionContext.
> Although through SCXML-197 already many improvements are realized, to be able to implement the new SCXMLSemantics requires additional (major) changes, which functionally should be regarded part of SCXML-197, but cannot be committed separately as the changes are too closely related.
> I'll therefore update SCXML-197 describing those functional changes regarding the better separation of concerns, although they will be committed against this issue.
> An important note is that with the re-implementation of the SCXMLSemantics, the static SCXMLHelper class, as well as the (Transition) Path helper class functionalities will be completely 'absorbed' into the model and the new algorithm implementation. These classes therefore no longer are used and needed and will be removed. 
> Furthermore, the Step class now only is used from within the SCXMLSemantics implementation and therefore moved to the semantics package.
> With these changes in SCXML-196 and SCXML-197, the goals for Milestone 1 on the roadmap to SCXML 2.0 have been completely met and I'll create a milestone 1 svn tag for it shortly. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)