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] Parallel States
Date Mon, 08 May 2006 21:50:00 GMT
On 5/8/06, Fasih <fasihullah.askiri@baypackets.com> wrote:
> Thanx
> I dont think that I really got your example!
> What will src="http://foo.bar/baz.scxml?param=1" do. More precisely, who is
> "producing" the SCXML template? Reading your mail I thougth you are
> suggesting something like
> src=http://foo.bar/baz.jsp?param=1 which would produce an SCXML! In any
> case, how does the param=1 help.
<snip/>

It will get us an InputSource for the Digester from the mentioned URL.
The URL doesn't have to be "static" URL/document, it could be a
servlet, JSP, velocity template, ASP.NET view ...

For example, if this is the bulk of a JSP 2.0 page,

<state id="foo${param.id}">
 <!-- some content -->
</state>

placed at URL http://foo.bar/baz.jsp , then
src="http://foo.bar/baz.jsp?id=1" will get us:

<state id="foo1">
 <!-- some content -->
</state>

to be pulled in as child state.


> Are you saying that I just add param=1
> param=2 etc to "fool" the scxml engine to think that they are different
> external srcs?
<snap/>

>From the runtime perspective, there is no such thing as a "external
source". It all becomes one state machine (as it should). The engine
pays attention to state IDs, they have be unique when all external
sources are pulled in.


>  By the way, what purpose does param=1 serve, other than being "intervowen"
> into ids? Does this mangling change the way I have done something? As in, if
> an event is thrown from baz.scxml will it be mangled too?
>
<snip/>

No. It just eliminates duplicate IDs when state templates are used. We
should really have an example of this.

-Rahul


>
> As an aside [;)] I did realize after some more snooping around that the
> problem is due to the same external ref that I am using, had it not been for
> the parallel, the SCXML would not have gone into an "illegal config"
>
> +Fasih
<snap/>

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