commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nestor Urquiza <nest...@yahoo.com>
Subject Re: [scxml] <assign> tag
Date Wed, 26 Apr 2006 16:27:13 GMT
Comments below,
As always your help is incredible useful.
Thanks a lot for such a good job you are doing,
Nestor

--- Rahul Akolkar <rahul.akolkar@gmail.com> wrote:

> 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.
> 

I really did not see or read there where I can put the
schema issue.

> 
> > 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.
> 

JEXL + Data() seems enough to me thanks ;-). I will
work with it and if I need enhancement maybe with
xpath functions or custom ones I will let you know. In
any case XQuery and/or Xpointer could be good
candidates too, don't you think? . In any case I am
just thinking in a pattern here about scripting
support that seems to be solved now in at least one
project I can see in the net [6]
 
> 
> > 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].
> 

You are right, thanks for pointing me back to a
response from Fasih to another post I made.

> 
> > 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?

I think so but in any case I do not need it right now.
If I need it in the future and still the enhancement
is not there then I will make the 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 :-)
> 

I agree. I am not a purist but I see the code could be
clearer and still the url could be only accessible
from certain IPs so security issue would  be not the
cause to ignore the @src approach. I still do not have
that much time so I will be working with the Fasih's
snippet and yes dude I will make the enhancement
request ... mmmh maybe I am a kind of purist and I am
just realizing it :-) Here is then the bug number: Bug
39413 

Best regards
> -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
> 
> 

[6]https://scripting.dev.java.net/


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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