commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ate Douma (JIRA)" <>
Subject [jira] [Commented] (SCXML-177) Correct error/warning messages in SCXML reading to be up-to-date
Date Wed, 04 Dec 2013 02:28:39 GMT


Ate Douma commented on SCXML-177:

Hi Woonsan,

I looked into the JexlEngine silent mode and it does make a difference with regards to behavior.

If (silent==false) (the default) it will throw a JexlException, which then is re-thrown by
the (SCXML) JexlEvaluator as SCXMLExpressionException, which is good.
If (silent==true) Jexl will only log a WARN message and return null (within its invocation
So IMO sticking to the default silent==false for the JexlEngine should be fine, probably without
need to also configure/override this through the SCXMLReader.

The (strict==true) setting for JexlEngine should IMO also be preferred, as default, but has
a most important caveat or consequence that  undefined/null variables result in an exception.
This will thus require somewhat more verbose scripting, e.g. like requiring '!empty(foo) and
foo.booleanMethod' instead of more lenient 'foo and foo.booleanMethod'.
Nonetheless, I'd prefer using (strict==true) for both the JexlEngine and SCXMLReader as default,
and providing SCXMLReader.setLenient(boolean) method to override this.

> Correct error/warning messages in SCXML reading to be up-to-date
> ----------------------------------------------------------------
>                 Key: SCXML-177
>                 URL:
>             Project: Commons SCXML
>          Issue Type: Bug
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>            Priority: Trivial
>             Fix For: 2.0
> Some error/warning logs are outdated against the newest spec.
> For example,
> org.apache.commons.scxml2.model.ModelException: No SCXML child state with ID "null" found;
illegal initialstate for SCXML document
> 	at
> It should inform of 'initial', not 'initialstate' and check if it is not set.

This message was sent by Atlassian JIRA

View raw message