On 11/15/06, THOMAS, JAYANT (SBCSI) <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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) <[EMAIL PROTECTED]> 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

Reply via email to