Ate Douma created SCXML-272:
-------------------------------

             Summary: Javascript engine (Nashorn) doesn't support native XML 
DOM operations 
                 Key: SCXML-272
                 URL: https://issues.apache.org/jira/browse/SCXML-272
             Project: Commons SCXML
          Issue Type: Improvement
    Affects Versions: 2.0
            Reporter: Ate Douma


While the Groovy and Jexl datamodels, being 'native' Java engine, can be used 
for XML DOM operations with <assign> and evaluation expressions, this doesn't 
work with the Nashorn Javascript egnine.
There simply is no Javascript DOM operation support in Nashorn, and there also 
doesn't seem to be an (practical) extension or something available elsewhere.

As a consequence, Commons SCXML cannot fully implement the SCXML mandatory 
features for the ecma datamodel.
This also is the cause of failure for 2 out of the last 3 non-passing [W3C 
SCXML IRP|https://www.w3.org/Voice/2013/scxml-irp/] tests (186 tests total):
# [test557|https://www.w3.org/Voice/2013/scxml-irp/557/test557.txml]
# [test561|https://www.w3.org/Voice/2013/scxml-irp/561/test561.txml]

both testing a similar expression like: 
{code:java}cond="var1.getElementsByTagName('book')[0].getAttribute('title') == 
'title1'"{code}
which simply fails to execute in Nashorn Javascript.
Both the Jexl and Groovy datamodels have no problem evaluating the above.

Note that ecma datamodel support itself is optionally, but *if* it is supported 
*then* mandatory tests like the above should pass.

As finding a practical solution or fix for this seems unlikely, I'm just 
reporting this here, but will close as Won't Fix (can't reallly).  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to