You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shale.apache.org by "THOMAS, JAYANT (SBCSI)" <jt...@att.com> on 2006/11/15 21:52:41 UTC

Navigating from One SCXML dialog to another SCXML dialog in shale

Hello All,
Is it possible I can navigate from one scxml dialog to another scxml
dialog in shale
 <dialog scxmlconfig="wizard.xml" name="wizard"
 
dataclassname="org.apache.shale.examples.test.dialog2.scxml.WizardData"/
>

 <dialog scxmlconfig="popup.xml" name="popup"
 
dataclassname="org.apache.shale.examples.test.dialog2.scxml.PopupData"/>


Say from Wizard.xml can I go to popup.xml in the sample. The example
show 2 different sets of dialogs without any interrelation ship.
Thanks
Jayant

Re: Navigating from One SCXML dialog to another SCXML dialog in shale

Posted by Rahul Akolkar <ra...@gmail.com>.
On 11/16/06, THOMAS, JAYANT (SBCSI) <jt...@att.com> wrote:
> Thanks, Iam using the dialog2 implementation inside shale, can I do the
> same.
<snip/>

Yup, should do, dialog2 was the sandbox moniker, its now the
shale-dialog module (and the two impls - shale-dialog-basic and
shale-dialog-scxml), part of the shale-framework-* builds [1].

IIRC, the "white box" nature referred to below was clarified post
v0.5, so dangling target references might need the Commons SCXML
nightlies [2] (trunk has test cases that verify the particular
behavior under discussion here).

If you have further questions, please ping the user list (Shale or
Commons, as you find appropriate). Thanks.

-Rahul

[1] http://people.apache.org/builds/shale/nightly/
[2] http://people.apache.org/builds/jakarta-commons/nightly/commons-scxml/


> Thanks
> Jayant
>
> -----Original Message-----
> From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com]
> Sent: Wednesday, November 15, 2006 7:36 PM
> To: dev@shale.apache.org
> Subject: Re: Navigating from One SCXML dialog to another SCXML dialog in
> shale
>
>
> On 11/15/06, THOMAS, JAYANT (SBCSI) <jt...@att.com> wrote:
> > Thanks, That is what I want , say for example I might have a bunch of
> > higher level states from where at certain point I can navigate to
> child
> > states defined in another xml like popup.xml, it will be nice If I can
> > navigate from Wizard to popup by saying something like
> #popup/statename
> > in the state transition logic of wizard itself.
> > I hope this is possible !!
> <snip/>
>
> If using the Commons SCXML dialogs impl, this is possible. In fact,
> you don't even need to use '#popup' (at the cost of implying unique
> IDs for <state>s when subdialog state machines are pulled in via 'src'
> attribute -- see subdialogs bit here [1]).
>
> This has to do with the semantics of SCXML itself, which treats
> included state machines as white boxes (this differs from the basic
> impl) and thus, you can have dangling transition targets (as long as
> they're available in the included state machine -- or vice versa) as
> you mention above.
>
> Note that you don't even need to declare the included state machine as
> a <dialog> in the dialog-config.xml unless you plan on using it as a
> standalone dialog (at which point, the dangling unresolved transition
> target references will cause a parse time failure, if you choose to
> have them).
>
> -Rahul
>
> [1] http://shale.apache.org/shale-dialog-scxml/
>
<snap/>

RE: Navigating from One SCXML dialog to another SCXML dialog in shale

Posted by "THOMAS, JAYANT (SBCSI)" <jt...@att.com>.
Thanks, Iam using the dialog2 implementation inside shale, can I do the
same.
Thanks
Jayant 

-----Original Message-----
From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] 
Sent: Wednesday, November 15, 2006 7:36 PM
To: dev@shale.apache.org
Subject: Re: Navigating from One SCXML dialog to another SCXML dialog in
shale


On 11/15/06, THOMAS, JAYANT (SBCSI) <jt...@att.com> wrote:
> Thanks, That is what I want , say for example I might have a bunch of
> higher level states from where at certain point I can navigate to
child
> states defined in another xml like popup.xml, it will be nice If I can
> navigate from Wizard to popup by saying something like
#popup/statename
> in the state transition logic of wizard itself.
> I hope this is possible !!
<snip/>

If using the Commons SCXML dialogs impl, this is possible. In fact,
you don't even need to use '#popup' (at the cost of implying unique
IDs for <state>s when subdialog state machines are pulled in via 'src'
attribute -- see subdialogs bit here [1]).

This has to do with the semantics of SCXML itself, which treats
included state machines as white boxes (this differs from the basic
impl) and thus, you can have dangling transition targets (as long as
they're available in the included state machine -- or vice versa) as
you mention above.

Note that you don't even need to declare the included state machine as
a <dialog> in the dialog-config.xml unless you plan on using it as a
standalone dialog (at which point, the dangling unresolved transition
target references will cause a parse time failure, if you choose to
have them).

-Rahul

[1] http://shale.apache.org/shale-dialog-scxml/


> Thanks
> Jayant
>
> -----Original Message-----
> From: craigmcc@gmail.com [mailto:craigmcc@gmail.com] On Behalf Of
Craig
> McClanahan
> Sent: Wednesday, November 15, 2006 1:06 PM
> To: dev@shale.apache.org
> Subject: Re: Navigating from One SCXML dialog to another SCXML dialog
in
> shale
>
>
> On 11/15/06, THOMAS, JAYANT (SBCSI) <jt...@att.com> wrote:
> >
> > Hello All,
> > Is it possible I can navigate from one scxml dialog to another scxml
> > dialog in shale
> > <dialog scxmlconfig="wizard.xml" name="wizard"
> >
> >
>
dataclassname="org.apache.shale.examples.test.dialog2.scxml.WizardData"/
> > >
> >
> > <dialog scxmlconfig="popup.xml" name="popup"
> >
> >
>
dataclassname="org.apache.shale.examples.test.dialog2.scxml.PopupData"/>
> >
> >
> > Say from Wizard.xml can I go to popup.xml in the sample. The example
> > show 2 different sets of dialogs without any interrelation ship.
> > Thanks
> > Jayant
> >
>
> Are you wanting to *have* a relationship between the dialogs, so that
> (for
> example) the popup dialog has access to both its own state and the
state
> of
> the wizard?  If so, there's a way to do this that works for both SCXML
> and
> basic dialog implementations.
>
> The documentation[1] includes a bit of information on how to start a
> dialog
> programmatically using the DialogContextManager.create() call.  But
> there is
> a second variation of create() that accepts a parent DialogContext
with
> which the child dialog should be associated ... it will be set as the
> "parent" property of the new DialogContext for the popup.
>
> There's example code that accomplishes this in both the
> shale-dialog-test-basic and shale-dialog-test-scxml test applications
> (you'll need to check out the sources directly from the SVN repository
> to
> get to this code, however).
>
> Craig
>
> [1] http://shale.apache.org/shale-dialog/index.html
>

Re: Navigating from One SCXML dialog to another SCXML dialog in shale

Posted by Rahul Akolkar <ra...@gmail.com>.
On 11/15/06, THOMAS, JAYANT (SBCSI) <jt...@att.com> wrote:
> Thanks, That is what I want , say for example I might have a bunch of
> higher level states from where at certain point I can navigate to child
> states defined in another xml like popup.xml, it will be nice If I can
> navigate from Wizard to popup by saying something like #popup/statename
> in the state transition logic of wizard itself.
> I hope this is possible !!
<snip/>

If using the Commons SCXML dialogs impl, this is possible. In fact,
you don't even need to use '#popup' (at the cost of implying unique
IDs for <state>s when subdialog state machines are pulled in via 'src'
attribute -- see subdialogs bit here [1]).

This has to do with the semantics of SCXML itself, which treats
included state machines as white boxes (this differs from the basic
impl) and thus, you can have dangling transition targets (as long as
they're available in the included state machine -- or vice versa) as
you mention above.

Note that you don't even need to declare the included state machine as
a <dialog> in the dialog-config.xml unless you plan on using it as a
standalone dialog (at which point, the dangling unresolved transition
target references will cause a parse time failure, if you choose to
have them).

-Rahul

[1] http://shale.apache.org/shale-dialog-scxml/


> Thanks
> Jayant
>
> -----Original Message-----
> From: craigmcc@gmail.com [mailto:craigmcc@gmail.com] On Behalf Of Craig
> McClanahan
> Sent: Wednesday, November 15, 2006 1:06 PM
> To: dev@shale.apache.org
> Subject: Re: Navigating from One SCXML dialog to another SCXML dialog in
> shale
>
>
> On 11/15/06, THOMAS, JAYANT (SBCSI) <jt...@att.com> wrote:
> >
> > Hello All,
> > Is it possible I can navigate from one scxml dialog to another scxml
> > dialog in shale
> > <dialog scxmlconfig="wizard.xml" name="wizard"
> >
> >
> dataclassname="org.apache.shale.examples.test.dialog2.scxml.WizardData"/
> > >
> >
> > <dialog scxmlconfig="popup.xml" name="popup"
> >
> >
> dataclassname="org.apache.shale.examples.test.dialog2.scxml.PopupData"/>
> >
> >
> > Say from Wizard.xml can I go to popup.xml in the sample. The example
> > show 2 different sets of dialogs without any interrelation ship.
> > Thanks
> > Jayant
> >
>
> Are you wanting to *have* a relationship between the dialogs, so that
> (for
> example) the popup dialog has access to both its own state and the state
> of
> the wizard?  If so, there's a way to do this that works for both SCXML
> and
> basic dialog implementations.
>
> The documentation[1] includes a bit of information on how to start a
> dialog
> programmatically using the DialogContextManager.create() call.  But
> there is
> a second variation of create() that accepts a parent DialogContext with
> which the child dialog should be associated ... it will be set as the
> "parent" property of the new DialogContext for the popup.
>
> There's example code that accomplishes this in both the
> shale-dialog-test-basic and shale-dialog-test-scxml test applications
> (you'll need to check out the sources directly from the SVN repository
> to
> get to this code, however).
>
> Craig
>
> [1] http://shale.apache.org/shale-dialog/index.html
>

RE: Navigating from One SCXML dialog to another SCXML dialog in shale

Posted by "THOMAS, JAYANT (SBCSI)" <jt...@att.com>.
Thanks, That is what I want , say for example I might have a bunch of
higher level states from where at certain point I can navigate to child
states defined in another xml like popup.xml, it will be nice If I can
navigate from Wizard to popup by saying something like #popup/statename
in the state transition logic of wizard itself.
I hope this is possible !!
Thanks
Jayant 

-----Original Message-----
From: craigmcc@gmail.com [mailto:craigmcc@gmail.com] On Behalf Of Craig
McClanahan
Sent: Wednesday, November 15, 2006 1:06 PM
To: dev@shale.apache.org
Subject: Re: Navigating from One SCXML dialog to another SCXML dialog in
shale


On 11/15/06, THOMAS, JAYANT (SBCSI) <jt...@att.com> wrote:
>
> Hello All,
> Is it possible I can navigate from one scxml dialog to another scxml
> dialog in shale
> <dialog scxmlconfig="wizard.xml" name="wizard"
>
>
dataclassname="org.apache.shale.examples.test.dialog2.scxml.WizardData"/
> >
>
> <dialog scxmlconfig="popup.xml" name="popup"
>
>
dataclassname="org.apache.shale.examples.test.dialog2.scxml.PopupData"/>
>
>
> Say from Wizard.xml can I go to popup.xml in the sample. The example
> show 2 different sets of dialogs without any interrelation ship.
> Thanks
> Jayant
>

Are you wanting to *have* a relationship between the dialogs, so that
(for
example) the popup dialog has access to both its own state and the state
of
the wizard?  If so, there's a way to do this that works for both SCXML
and
basic dialog implementations.

The documentation[1] includes a bit of information on how to start a
dialog
programmatically using the DialogContextManager.create() call.  But
there is
a second variation of create() that accepts a parent DialogContext with
which the child dialog should be associated ... it will be set as the
"parent" property of the new DialogContext for the popup.

There's example code that accomplishes this in both the
shale-dialog-test-basic and shale-dialog-test-scxml test applications
(you'll need to check out the sources directly from the SVN repository
to
get to this code, however).

Craig

[1] http://shale.apache.org/shale-dialog/index.html

Re: Navigating from One SCXML dialog to another SCXML dialog in shale

Posted by Craig McClanahan <cr...@apache.org>.
On 11/15/06, THOMAS, JAYANT (SBCSI) <jt...@att.com> wrote:
>
> Hello All,
> Is it possible I can navigate from one scxml dialog to another scxml
> dialog in shale
> <dialog scxmlconfig="wizard.xml" name="wizard"
>
> dataclassname="org.apache.shale.examples.test.dialog2.scxml.WizardData"/
> >
>
> <dialog scxmlconfig="popup.xml" name="popup"
>
> dataclassname="org.apache.shale.examples.test.dialog2.scxml.PopupData"/>
>
>
> Say from Wizard.xml can I go to popup.xml in the sample. The example
> show 2 different sets of dialogs without any interrelation ship.
> Thanks
> Jayant
>

Are you wanting to *have* a relationship between the dialogs, so that (for
example) the popup dialog has access to both its own state and the state of
the wizard?  If so, there's a way to do this that works for both SCXML and
basic dialog implementations.

The documentation[1] includes a bit of information on how to start a dialog
programmatically using the DialogContextManager.create() call.  But there is
a second variation of create() that accepts a parent DialogContext with
which the child dialog should be associated ... it will be set as the
"parent" property of the new DialogContext for the popup.

There's example code that accomplishes this in both the
shale-dialog-test-basic and shale-dialog-test-scxml test applications
(you'll need to check out the sources directly from the SVN repository to
get to this code, however).

Craig

[1] http://shale.apache.org/shale-dialog/index.html