You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Mike Sparr - www.goomzee.com" <mi...@goomzee.com> on 2006/04/07 10:30:53 UTC

[SCXML] ordering of transitions

I found that if we have a multiple transition events within a state and any
without a guard condition get processed before reaching the guard conditions
of the other transition events.  Is this the expected behavior?

For instance:

<state id="1">
<transition event="menu"></transition>
<transition event="choice" cond="${request.input == 'help'}"> do something /
target state = 2 </transition>
<transition event="choice" cond="${request.input == 'call'}"> do something
else / target state=2 </transition>
</state>

<state id="2">
 ... stuff
</state>


It never processes the guard conditions, however if I place the first event
without the guard condition AFTER the two with, even though they have
different event names, it works?

Any reasoning behind this.  I get odd errors where it actually creates 2
states simultaneously.

======

Also, what are the rules with using the single quotes within double quotes
for variables.  When referencing the variables I set expr="'something'" it
actually passed 'something' instead of something ???


Thanks,


Mike



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


Re: [betwixt] attributes inside list items

Posted by Mornak <dm...@gmail.com>.
I think it is the same problem that I answer a minute ago in this list

i am copying the message




From: Mornak <dm...@gmail.com>
Date: Apr 7, 2006 5:40 PM
Subject: Re: [betwixt] attributes disables a element ?
To: Jakarta Commons Users List <co...@jakarta.apache.org>


You are right! the attribute disbles the content

If you want to read both of them you youl use the tag text

Something like this
<element name="list">
        <element name="id">
                <attribute name="recipient" property="recipient"/>
                <text property="id" />
        </element>
</element>

When i tried this with the 0.7 release it didn't work. I got a
nightbuild and it worked fine

I hope this will help you

PD: excuse my terrible english




On 4/7/06, denis queffeulou <de...@wokup.com> wrote:
> Hi,
>
> I have the following betwixt :
>
>                     <element name="list">
>                         <element name="id" property="id"/>
>                         <!--
>                             <attribute name="recipient"
> property="recipient"/>
>                         </element>
>                         -->
>                     </element>
>
> With comment, I can retrieve the id property from XML,
> but if I add the attribute "recipient", then I get a *null* "id" and a
> good "recipient".
>
> The XML is
>           <list>
>             <id recipient="089786756">8090</id>
>           </list>
>
>
> I don't undertsand why this doesn't work with the attribute ??
> --
> Denis
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>




On 4/7/06, denis queffeulou <de...@wokup.com> wrote:
> Hi ,
>
> I'm using a bean that contains a list of String (items) and a
> getMessageId() method.
> I have the following betwixt:
>
>                 <element name="list">
>                     <element name="item" property="items">
>                         <attribute name="attr1" value=""/>
>                         <attribute name="attr2" property="messageId"/>
>                     </element>
>                 </element>
>
> and I hope get the following XML :
>
> <list>
>     <item attr1="" attr2="somevalue of main bean"/>
>     <item attr1="" attr2="somevalue of main bean"/>
> ...
> </list>
>
> but I got:
> <list>
>     <item>some value</item>
>     <item>some value</item>
> ...
> </list>
>
> It seems that attributes are not processed ??
>
> anyone knows why ?
> --
> Denis
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


--

To Iterate is Human, to Recurse, Divine
 - James O. Coplien, Bell Labs

-------------------------------------
<EPI/> - Deploying ideas
-------------------------------------
Ing. Diego H. Mornacco
Desarrollador
Epidata Consulting
Maipú 521 1er piso Of. A
Ofi: 5031 0060 / 61
Cel: 15-5884-0040
www.epidataconsulting.com

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


Re: [betwixt] attributes disables a element ?

Posted by denis queffeulou <de...@wokup.com>.
thanks for help,
I tried it but I ran into other problems
Actually I found too much strange thing in betwixt so I moved to jibx 
which works well for my needs.

-- 
Denis

>You are right! the attribute disbles the content
>
>If you want to read both of them you youl use the tag text
>
>Something like this
><element name="list">
>	<element name="id">
>		<attribute name="recipient" property="recipient"/>
>		<text property="id" />
>	</element>
></element>
>
>When i tried this with the 0.7 release it didn't work. I got a
>nightbuild and it worked fine
>
>I hope this will help you
>
>PD: excuse my terrible english
>
>
>
>
>On 4/7/06, denis queffeulou <de...@wokup.com> wrote:
>  
>
>>Hi,
>>
>>I have the following betwixt :
>>
>>                    <element name="list">
>>                        <element name="id" property="id"/>
>>                        <!--
>>                            <attribute name="recipient"
>>property="recipient"/>
>>                        </element>
>>                        -->
>>                    </element>
>>
>>With comment, I can retrieve the id property from XML,
>>but if I add the attribute "recipient", then I get a *null* "id" and a
>>good "recipient".
>>
>>The XML is
>>          <list>
>>            <id recipient="089786756">8090</id>
>>          </list>
>>
>>
>>I don't undertsand why this doesn't work with the attribute ??
>>--
>>Denis
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>--
>
>To Iterate is Human, to Recurse, Divine
> - James O. Coplien, Bell Labs
>
>-------------------------------------
><EPI/> - Deploying ideas
>-------------------------------------
>Ing. Diego H. Mornacco
>Desarrollador
>Epidata Consulting
>Maipú 521 1er piso Of. A
>Ofi: 5031 0060 / 61
>Cel: 15-5884-0040
>www.epidataconsulting.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>
>  
>


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


Re: [betwixt] attributes disables a element ?

Posted by Mornak <dm...@gmail.com>.
You are right! the attribute disbles the content

If you want to read both of them you youl use the tag text

Something like this
<element name="list">
	<element name="id">
		<attribute name="recipient" property="recipient"/>
		<text property="id" />
	</element>
</element>

When i tried this with the 0.7 release it didn't work. I got a
nightbuild and it worked fine

I hope this will help you

PD: excuse my terrible english




On 4/7/06, denis queffeulou <de...@wokup.com> wrote:
> Hi,
>
> I have the following betwixt :
>
>                     <element name="list">
>                         <element name="id" property="id"/>
>                         <!--
>                             <attribute name="recipient"
> property="recipient"/>
>                         </element>
>                         -->
>                     </element>
>
> With comment, I can retrieve the id property from XML,
> but if I add the attribute "recipient", then I get a *null* "id" and a
> good "recipient".
>
> The XML is
>           <list>
>             <id recipient="089786756">8090</id>
>           </list>
>
>
> I don't undertsand why this doesn't work with the attribute ??
> --
> Denis
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


--

To Iterate is Human, to Recurse, Divine
 - James O. Coplien, Bell Labs

-------------------------------------
<EPI/> - Deploying ideas
-------------------------------------
Ing. Diego H. Mornacco
Desarrollador
Epidata Consulting
Maipú 521 1er piso Of. A
Ofi: 5031 0060 / 61
Cel: 15-5884-0040
www.epidataconsulting.com

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


[betwixt] attributes disables a element ?

Posted by denis queffeulou <de...@wokup.com>.
Hi,

I have the following betwixt :

                    <element name="list">
                        <element name="id" property="id"/>
                        <!--
                            <attribute name="recipient" 
property="recipient"/>
                        </element>
                        -->
                    </element>

With comment, I can retrieve the id property from XML,
but if I add the attribute "recipient", then I get a *null* "id" and a 
good "recipient".

The XML is
          <list>
            <id recipient="089786756">8090</id>
          </list>


I don't undertsand why this doesn't work with the attribute ??
--
Denis



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


[betwixt] attributes inside list items

Posted by denis queffeulou <de...@wokup.com>.
Hi ,

I'm using a bean that contains a list of String (items) and a 
getMessageId() method.
I have the following betwixt:

                <element name="list">
                    <element name="item" property="items">
                        <attribute name="attr1" value=""/>
                        <attribute name="attr2" property="messageId"/>
                    </element>
                </element>

and I hope get the following XML :

<list>
    <item attr1="" attr2="somevalue of main bean"/>
    <item attr1="" attr2="somevalue of main bean"/>
...
</list>

but I got:
<list>
    <item>some value</item>
    <item>some value</item>
...
</list>

It seems that attributes are not processed ??

anyone knows why ?
--
Denis



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


Re: [SCXML] ordering of transitions

Posted by "Mike Sparr - www.goomzee.com" <mi...@goomzee.com>.
Thanks Rahul,

I'll post requests next week and have one of my guys take on dev env.
(understood on out of scope for list).

Sleep well! :)

Mike





On 4/8/06 12:11 AM, "Rahul Akolkar" <ra...@gmail.com> wrote:

> On 4/8/06, Mike Sparr - www.goomzee.com <mi...@goomzee.com> wrote:
>> Oddly enough, the send event was choice and it never got to choice and
>> executed menu, or both?  The log showed error with two states, comma
>> delimited [logged_in, logged_off] ...
>> 
>> I had some demos to present so I didn't want to compromize our app so I'm
>> still running off old snapshot - could be old behavior.  I'll follow the
>> links in your other response and update our version this week and report odd
>> behavior if any.
>> 
> <snip/>
> 
> Sure, makes sense to hold on to the old snapshot in that case. The
> demo powers that be need to be happy. Again, a complete test case will
> be of much help, I did not understand the issue with the snippet you
> posted earlier.
> 
> 
>> No memory issues, just a concern. EL functionality desired and yes I tried
>> substringAfter().  I will definitely add feature request to upgrade the EL
>> package as the behavior you describe would be fantastic, especially for our
>> use-case.  I'll be kicking off another phase of product development soon and
>> will update our base and build out accordingly.  This phase adding JAAS
>> security for RDBMS/LDAP auth, Caching, XML Configuration, Hot
>> Deploy/Performance mode in P1 and other bits in P2, P3.
>> 
>> No marketing materials yet but if I send off demo URL and script, could you
>> perhaps UML SC model it for USE-CASE you can publish.  I should have that
>> ready next week.  Thanks for the other pointers and once I fully engage this
>> coming week, I'll make a shopping list in bugzilla.  :)
>> 
> <snap/>
> 
> TIA. Usecases are good, we're always looking to publish more usecases.
> Folks often ask - so who uses this stuff? Usecases become the answers
> :-)
> 
> 
>> We are setting up new office/dev env.  Workstations on running Win XP Pro w/
>> Apache 2, JDK5, Tomcat, etc.  Setting up central dev and wondering best
>> suggested combination?  Subversion / Bugzilla (linux RHEL box) and then Win
>> clients on workstations?  Input appreciated.
>> 
> <snip/>
> 
> This is probably OT for this mailing list, plus I'm mostly in a user's
> capacity for many of the listed things, so somewhat inappropriate for
> me to comment on that.
> 
> -Rahul
> 
> 
>> Cheers,
>> 
>> 
>> Mike
>> 
> <snip/>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 



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


Re: [SCXML] ordering of transitions

Posted by Rahul Akolkar <ra...@gmail.com>.
On 4/8/06, Mike Sparr - www.goomzee.com <mi...@goomzee.com> wrote:
> Oddly enough, the send event was choice and it never got to choice and
> executed menu, or both?  The log showed error with two states, comma
> delimited [logged_in, logged_off] ...
>
> I had some demos to present so I didn't want to compromize our app so I'm
> still running off old snapshot - could be old behavior.  I'll follow the
> links in your other response and update our version this week and report odd
> behavior if any.
>
<snip/>

Sure, makes sense to hold on to the old snapshot in that case. The
demo powers that be need to be happy. Again, a complete test case will
be of much help, I did not understand the issue with the snippet you
posted earlier.


> No memory issues, just a concern. EL functionality desired and yes I tried
> substringAfter().  I will definitely add feature request to upgrade the EL
> package as the behavior you describe would be fantastic, especially for our
> use-case.  I'll be kicking off another phase of product development soon and
> will update our base and build out accordingly.  This phase adding JAAS
> security for RDBMS/LDAP auth, Caching, XML Configuration, Hot
> Deploy/Performance mode in P1 and other bits in P2, P3.
>
> No marketing materials yet but if I send off demo URL and script, could you
> perhaps UML SC model it for USE-CASE you can publish.  I should have that
> ready next week.  Thanks for the other pointers and once I fully engage this
> coming week, I'll make a shopping list in bugzilla.  :)
>
<snap/>

TIA. Usecases are good, we're always looking to publish more usecases.
Folks often ask - so who uses this stuff? Usecases become the answers
:-)


> We are setting up new office/dev env.  Workstations on running Win XP Pro w/
> Apache 2, JDK5, Tomcat, etc.  Setting up central dev and wondering best
> suggested combination?  Subversion / Bugzilla (linux RHEL box) and then Win
> clients on workstations?  Input appreciated.
>
<snip/>

This is probably OT for this mailing list, plus I'm mostly in a user's
capacity for many of the listed things, so somewhat inappropriate for
me to comment on that.

-Rahul


> Cheers,
>
>
> Mike
>
<snip/>

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


Re: [SCXML] ordering of transitions

Posted by "Mike Sparr - www.goomzee.com" <mi...@goomzee.com>.
Oddly enough, the send event was choice and it never got to choice and
executed menu, or both?  The log showed error with two states, comma
delimited [logged_in, logged_off] ...

I had some demos to present so I didn't want to compromize our app so I'm
still running off old snapshot - could be old behavior.  I'll follow the
links in your other response and update our version this week and report odd
behavior if any.

No memory issues, just a concern.  EL functionality desired and yes I tried
substringAfter().  I will definitely add feature request to upgrade the EL
package as the behavior you describe would be fantastic, especially for our
use-case.  I'll be kicking off another phase of product development soon and
will update our base and build out accordingly.  This phase adding JAAS
security for RDBMS/LDAP auth, Caching, XML Configuration, Hot
Deploy/Performance mode in P1 and other bits in P2, P3.

No marketing materials yet but if I send off demo URL and script, could you
perhaps UML SC model it for USE-CASE you can publish.  I should have that
ready next week.  Thanks for the other pointers and once I fully engage this
coming week, I'll make a shopping list in bugzilla.  :)

We are setting up new office/dev env.  Workstations on running Win XP Pro w/
Apache 2, JDK5, Tomcat, etc.  Setting up central dev and wondering best
suggested combination?  Subversion / Bugzilla (linux RHEL box) and then Win
clients on workstations?  Input appreciated.

Cheers,


Mike




On 4/7/06 11:34 PM, "Rahul Akolkar" <ra...@gmail.com> wrote:

> On 4/7/06, Mike Sparr - www.goomzee.com <mi...@goomzee.com> wrote:
>> I found that if we have a multiple transition events within a state and any
>> without a guard condition get processed before reaching the guard conditions
>> of the other transition events.  Is this the expected behavior?
>> 
>> For instance:
>> 
>> <state id="1">
>> <transition event="menu"></transition>
>> <transition event="choice" cond="${request.input == 'help'}"> do something /
>> target state = 2 </transition>
>> <transition event="choice" cond="${request.input == 'call'}"> do something
>> else / target state=2 </transition>
>> </state>
>> 
>> <state id="2">
>>  ... stuff
>> </state>
>> 
>> 
>> It never processes the guard conditions, however if I place the first event
>> without the guard condition AFTER the two with, even though they have
>> different event names, it works?
>> 
> <snip/>
> 
> What event is being fired for this scenario when you're in state 1? If
> its "menu", there is only one candidate transition there, if its
> "choice" then there is no ambiguity either since the conds will ensure
> that at most one transition is followed.
> 
> Sorry, it seems I didn't quite get that. In order to be able to tell
> you why the ordering would play any role in this particular scenario,
> could you please post the smallest complete SCXML document and the
> event name(s) that are fired on the state machine, in the correct
> order, so I can reproduce your observations? Thanks in advance.
> 
> 
>> Any reasoning behind this.  I get odd errors where it actually creates 2
>> states simultaneously.
>> 
> <snap/>
> 
> Trying to navigate into two sibling states that are not regions
> (children of a parallel) is semantically a folly in SCXML. Probably a
> more complete snippet will explain why that is happening here.
> 
> 
>> ======
>> 
>> Also, what are the rules with using the single quotes within double quotes
>> for variables.  When referencing the variables I set expr="'something'" it
>> actually passed 'something' instead of something ???
>> 
> <snip/>
> 
> Depends on the expression language. If you're using EL, you don't need
> the single quotes for assigning String constant values, since the only
> expressions are those wrapped in ${...}, so any bits that don't match
> default to a constant String:
> 
> <assign name="foo" expr="bar"/> <!-- EL, no single quotes -->
> 
> but if you're using JEXL the single quotes are needed otherwise the
> intended String literal will be evaluated as an expression (and
> probably evaluate to null), so:
> 
> <assign name="foo" expr="'bar'"/> <!-- JEXL, single quotes -->
> 
> -Rahul
> 
> 
>> 
>> Thanks,
>> 
>> 
>> Mike
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 



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


Re: [SCXML] ordering of transitions

Posted by Rahul Akolkar <ra...@gmail.com>.
On 4/7/06, Mike Sparr - www.goomzee.com <mi...@goomzee.com> wrote:
> I found that if we have a multiple transition events within a state and any
> without a guard condition get processed before reaching the guard conditions
> of the other transition events.  Is this the expected behavior?
>
> For instance:
>
> <state id="1">
> <transition event="menu"></transition>
> <transition event="choice" cond="${request.input == 'help'}"> do something /
> target state = 2 </transition>
> <transition event="choice" cond="${request.input == 'call'}"> do something
> else / target state=2 </transition>
> </state>
>
> <state id="2">
>  ... stuff
> </state>
>
>
> It never processes the guard conditions, however if I place the first event
> without the guard condition AFTER the two with, even though they have
> different event names, it works?
>
<snip/>

What event is being fired for this scenario when you're in state 1? If
its "menu", there is only one candidate transition there, if its
"choice" then there is no ambiguity either since the conds will ensure
that at most one transition is followed.

Sorry, it seems I didn't quite get that. In order to be able to tell
you why the ordering would play any role in this particular scenario,
could you please post the smallest complete SCXML document and the
event name(s) that are fired on the state machine, in the correct
order, so I can reproduce your observations? Thanks in advance.


> Any reasoning behind this.  I get odd errors where it actually creates 2
> states simultaneously.
>
<snap/>

Trying to navigate into two sibling states that are not regions
(children of a parallel) is semantically a folly in SCXML. Probably a
more complete snippet will explain why that is happening here.


> ======
>
> Also, what are the rules with using the single quotes within double quotes
> for variables.  When referencing the variables I set expr="'something'" it
> actually passed 'something' instead of something ???
>
<snip/>

Depends on the expression language. If you're using EL, you don't need
the single quotes for assigning String constant values, since the only
expressions are those wrapped in ${...}, so any bits that don't match
default to a constant String:

<assign name="foo" expr="bar"/> <!-- EL, no single quotes -->

but if you're using JEXL the single quotes are needed otherwise the
intended String literal will be evaluated as an expression (and
probably evaluate to null), so:

<assign name="foo" expr="'bar'"/> <!-- JEXL, single quotes -->

-Rahul


>
> Thanks,
>
>
> Mike
>

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