commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ate Douma (JIRA)" <>
Subject [jira] [Resolved] (SCXML-187) Add support for initial SCXML script (SCXML spec 3.2.2: <scxml> children)
Date Fri, 17 Jan 2014 13:25:20 GMT


Ate Douma resolved SCXML-187.

    Resolution: Fixed

Feature committed

> Add support for initial SCXML script (SCXML spec 3.2.2: <scxml> children) 
> --------------------------------------------------------------------------
>                 Key: SCXML-187
>                 URL:
>             Project: Commons SCXML
>          Issue Type: New Feature
>    Affects Versions: 2.0
>            Reporter: Ate Douma
>            Assignee: Ate Douma
>             Fix For: 2.0
> The SCXML spec [1] section 3.2.2 <scxml> children, defines as an allowable child
> - <script> Provides scripting capability. Occurs 0 or 1 times.
> Current Commons SCXML doesn't yet support this feature, ignoring such initial script
> As this will be very useful also for the Groovy language support (SCXML-186), I'll add
this feature to Commons SCXML now.
> Important to note is the Context to be provided to such initial script execution.
> The intend (at least in my interpretation) of using such an initial script is that it
can access as well as set any context (data) variable globally for the rest of the document.
> This means that the Context for the initial script execution much be a parent Context
for all other element, including sibling 'root' states.
> Using the root Context for this purpose however is IMO not the right way as it would
(potentially) impact/change the outcome of a reset of the SCXMLExecutor, which resets all
Contexts except for the root Context (as being a provider of *external* context).
> So, the way I'm going to solve this is by introducing a separate InitialScriptContext,
having the root Context as parent and itself being used as parent for all other contexts,
and thereby properly resettable through SCXMLExecutor reset.
> Also of importance to mention is when and how this initial script will be executed.
> The initial script (if defined) will be stored as a (self) Transition action of a synthesized
Action (no parent, no children) and stored in the SCXML model object.
> During the SCXML initialization/reset by the SCXMLExecutor this script (parent transition)
then will be injected it in the initial step transition list and thereby executed as first
> As a transition action, the initial script execution won't 'trigger' any event, only
registered listeners will be notified of its 'transition' 
> [1]

This message was sent by Atlassian JIRA

View raw message