commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <rahul.akol...@gmail.com>
Subject Re: [scxml] <assign> tag
Date Wed, 26 Apr 2006 15:31:07 GMT
On 4/26/06, Nestor Urquiza <nestoru@yahoo.com> wrote:
> So is this a thing to be reported to w3c right? Could
> you tell where?
>
<snip/>

All information is here [1]. Note that Working Drafts increment (in
this case) on an average every 4-5 months, so it might be a while
before the actual text gets updated.


> Also it is very intersting that I was planning to use
> an xml to javabean kind of mapping in order to be able
> to test for conditions that are expressend in an
> external xml settings file.
>
<snap/>

Yup, you can have an XML data model, now if only someone plugged in
XPath as the third EL [2] in the Commons SCXML implementation, we'd be
all set for scenarios like this one (though you can proceed today
using JEXL/JSP 2.0 EL and the Data() function, as the test case I
pointed to in the earlier post). Feel free to open an enhancement
request [3] for supporting XPath, patches [4] to achieve the same are
welcome too, if you're so inclined.


> This discussion has shown that I could use the data
> model to test directly for those conditions and I see
> two/maybe three possible ways:
>
> 1)I include the data model within the scxml file.
>
<snip/>

True.


> 2)From java code I insert automatically the datamodel
> as part of the scxml file. Any method available for
> doing that already?
>
<snap/>

Sure, I remember seeing Fasih do that from a snippet in an earlier
unrelated post [5].


> 3)I reference the external xml file using the @src
> attribute but as you said it is not yet supported.
>
<snip/>

There is really no reason to not support it (other than finding time).
We're already reading @src into the Assign instance, just need to go
fetch the document from the URL in Assign#execute(), and handle
failure. Another enhancement request?


> For my usecase I need the setting file (the one that
> holds the datamodel) to be hidden from my clients but
> I need the scxml file to be readable by them. Of
> course I can always put everything in just an scxml
> file and then using xslt publish just the interesting
> nodes for cients (ommitting the data model for
> example). I can also refer to an http source (if later
> implemented) that is only accessible from the system
> IP but I see option 2 like the best for my case.
>
<snap/>

Purists will mention that the hybrid option 2 reduces readability and
makes code harder to understand etc., though if you want to "hide" the
datamodel one could argue this injection is a great approach :-)

-Rahul

[1] http://www.w3.org/Voice/
[2] http://jakarta.apache.org/commons/scxml/guide/contexts-evaluators.html
[3] http://jakarta.apache.org/commons/scxml/issue-tracking.html
[4] http://jakarta.apache.org/commons/patches.html
[5] http://marc.theaimsgroup.com/?l=jakarta-commons-user&m=114548526107662&w=2


> Thanks as always for your advice,
> Nestor
>
<snip/>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message