You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Nestor Urquiza <ne...@yahoo.com> on 2006/04/26 03:37:50 UTC

[scxml] tag

Hello guys,
According to the scxml schema now @name is not
supported as an attribute. However the current
implementation accounts for it (@expr, @location and
@src are the only attributes)

Does this mean we have to put @location instead of
@name? The current library interprets @name but not
@location

Thanks!

__________________________________________________
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


Re: [scxml] tag

Posted by Nestor Urquiza <ne...@yahoo.com>.
Many thanks, really many!

--- Rahul Akolkar <ra...@gmail.com> wrote:

> On 4/26/06, Nestor Urquiza <ne...@yahoo.com>
> wrote:
> <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.
> >
> <snap/>
> 
> You have to subscribe to the mailing list mentioned
> on that page
> (www-voice@), and send an email there. Please be
> patient, someone on
> the working group will respond once they get a
> chance.
> 
> 
> >
> > 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]
> >
> <snip/>
> 
> Yes, definitely good suggestions, and probably many
> usecases for those
> ELs in SCXML documents. That is why the expression
> language was
> designed to be as pluggable as possible in the
> Commons SCXML
> implementation. Hopefully, some of those plugs will
> be contributed by
> the community, since personally even though I see
> good value in them,
> it will be a while before I get to that.
> 
> 
> >
> > 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
> >
> <snap/>
> 
> Thanks, I'll take a look at it, probably over the
> weekend.
> 
> -Rahul
> 
> 
> > > > 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
> 
> 


__________________________________________________
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


Re: [scxml] tag

Posted by Rahul Akolkar <ra...@gmail.com>.
On 4/26/06, Nestor Urquiza <ne...@yahoo.com> wrote:
<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.
>
<snap/>

You have to subscribe to the mailing list mentioned on that page
(www-voice@), and send an email there. Please be patient, someone on
the working group will respond once they get a chance.


>
> 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]
>
<snip/>

Yes, definitely good suggestions, and probably many usecases for those
ELs in SCXML documents. That is why the expression language was
designed to be as pluggable as possible in the Commons SCXML
implementation. Hopefully, some of those plugs will be contributed by
the community, since personally even though I see good value in them,
it will be a while before I get to that.


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

Thanks, I'll take a look at it, probably over the weekend.

-Rahul


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


Re: [scxml] tag

Posted by Nestor Urquiza <ne...@yahoo.com>.
Comments below,
As always your help is incredible useful.
Thanks a lot for such a good job you are doing,
Nestor

--- Rahul Akolkar <ra...@gmail.com> wrote:

> On 4/26/06, Nestor Urquiza <ne...@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


Re: [scxml] tag

Posted by Rahul Akolkar <ra...@gmail.com>.
On 4/26/06, Nestor Urquiza <ne...@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


Re: [scxml] tag

Posted by Nestor Urquiza <ne...@yahoo.com>.
So is this a thing to be reported to w3c right? Could
you tell where?

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.

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.

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

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

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.

Thanks as always for your advice,
Nestor

--- Rahul Akolkar <ra...@gmail.com> wrote:

> On 4/25/06, Nestor Urquiza <ne...@yahoo.com>
> wrote:
> > Hello guys,
> > According to the scxml schema now @name is not
> > supported as an attribute. However the current
> > implementation accounts for it (@expr, @location
> and
> > @src are the only attributes)
> >
> > Does this mean we have to put @location instead of
> > @name? The current library interprets @name but
> not
> > @location
> >
> <snip/>
> 
> The schema is off in this regard, the <assign> usage
> with the @name
> matches the <var> declaration. The usage with the
> @location matches
> the <data> declaration. Assignments may have:
> 
>  * lvalue as a scratch space variable defined by
> <var>
>    <assign name="..." expr="..." />
> 
>  * lvalue as a node of a XML <data> tree
>    <assign location="..." expr="..." />
> 
>  * lvalue and rvalue as a node of a XML <data> tree
>    <assign location="..." expr="..." /> <!-- expr
> evaluates to a node -->
> 
> See this test case [1] for usages (being a test
> case, the purpose is
> to showcase <assign> usages, the state machine isn't
> supposed to mean
> anything). The data model bits (<datamodel>, <data>,
> <var>, <assign>,
> and the EL / JEXL Data() function) deserve an entire
> section in the
> Commons SCXML user guide, once one of us writes it
> up.
> 
> The @src for <assign> is not yet supported (since no
> one's using it I
> guess) -- but should be a straightforward addition.
> 
> -Rahul
> 
> (long, possibly fragmented URL below)
> 
> [1]
>
http://svn.apache.org/repos/asf/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/datamodel-01.xml
> 
> 
> > Thanks!
> >
> <snap/>
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> 
> 


__________________________________________________
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


Re: [scxml] tag

Posted by Rahul Akolkar <ra...@gmail.com>.
On 4/25/06, Nestor Urquiza <ne...@yahoo.com> wrote:
> Hello guys,
> According to the scxml schema now @name is not
> supported as an attribute. However the current
> implementation accounts for it (@expr, @location and
> @src are the only attributes)
>
> Does this mean we have to put @location instead of
> @name? The current library interprets @name but not
> @location
>
<snip/>

The schema is off in this regard, the <assign> usage with the @name
matches the <var> declaration. The usage with the @location matches
the <data> declaration. Assignments may have:

 * lvalue as a scratch space variable defined by <var>
   <assign name="..." expr="..." />

 * lvalue as a node of a XML <data> tree
   <assign location="..." expr="..." />

 * lvalue and rvalue as a node of a XML <data> tree
   <assign location="..." expr="..." /> <!-- expr evaluates to a node -->

See this test case [1] for usages (being a test case, the purpose is
to showcase <assign> usages, the state machine isn't supposed to mean
anything). The data model bits (<datamodel>, <data>, <var>, <assign>,
and the EL / JEXL Data() function) deserve an entire section in the
Commons SCXML user guide, once one of us writes it up.

The @src for <assign> is not yet supported (since no one's using it I
guess) -- but should be a straightforward addition.

-Rahul

(long, possibly fragmented URL below)

[1] http://svn.apache.org/repos/asf/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jexl/datamodel-01.xml


> Thanks!
>
<snap/>

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