Re: Passing data between a dialog and a subdialog

2007-07-23 Thread Rahul Akolkar

On 7/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi Rahul,

thanks for your answer.

> Subdialogs receive the same dialog data (same instance of data
> class) so there is no need for any such elaborate mechanism.
I find it a bit dangerous to let two independent "components" work on the same 
set of data especially if the components are being developed by different people 
(potentially in different places). Shouldn't we treat a client component the same way we 
would treat a server component? If we do so, the client components should also have well 
defined interfaces through which they talk with each other (the interfaces don't have to 
be Java interfaces).




The SCXML implementation has its own view about the "independence" of
parent-child dialogs. Subdialogs are white boxes, you can look in, you
can navigate directly to a state therein, you can access the
data(model), you can attach listeners to the parent that watch changes
in a subdialog for behavioral niceties etc. i.e. most things are
transparent. For some set of applications, this works well (without
manufactured interfaces and stunning XML vocabularies).



Just think of a large distributed development team in which every developer is 
assigned to work on a different (complex) dialog and the dialogs interact with 
each other. Then throw farshoring and dialog reuse across different IT 
companies for the same customer into the mix :-)




As you have articulated above, for another set of applications, there
are additional considerations at play. I would like to believe that
the architects who choose the SCXML implementation, choose it for its
extensibility, overall positive impact across the development cycle,
and additional potential exposed by virtue of some of the
transparencies -- and are also aware of what this means it terms of
putting pen to paper (and fingertips to keyboard).

-Rahul



Gruß
Marc



AW: Passing data between a dialog and a subdialog

2007-07-23 Thread marc.jaeckle
Hi Rahul,
 
thanks for your answer.
 
> Subdialogs receive the same dialog data (same instance of data
> class) so there is no need for any such elaborate mechanism.
I find it a bit dangerous to let two independent "components" work on the same 
set of data especially if the components are being developed by different 
people (potentially in different places). Shouldn't we treat a client component 
the same way we would treat a server component? If we do so, the client 
components should also have well defined interfaces through which they talk 
with each other (the interfaces don't have to be Java interfaces).
 
Just think of a large distributed development team in which every developer is 
assigned to work on a different (complex) dialog and the dialogs interact with 
each other. Then throw farshoring and dialog reuse across different IT 
companies for the same customer into the mix :-)
 
Gruß
Marc



Von: Rahul Akolkar [mailto:[EMAIL PROTECTED]
Gesendet: Mo 23.07.2007 21:23
An: user@shale.apache.org
Betreff: Re: Passing data between a dialog and a subdialog



On 7/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> But is there also a way to do that in the xml dialog definition. Something 
> like
> 
>
>   
>   
>
>...
> 
> (Web Flow example)
>


 * Basic implementation:

   No, there isn't a declarative way to do that via the
dialog-config.xml. However, feel free to open an enhancement request
via JIRA [1] about making data flow easier / more elegant across
parent-child dialogs (if there isn't one already, please check
existing tickets).

 * SCXML implementation:

   Subdialogs receive the same dialog data (same instance of data
class) so there is no need for any such elaborate mechanism.

-Rahul

[1] http://shale.apache.org/issue-tracking.html


> Gruß
> Marc
>
>
> -Ursprüngliche Nachricht-
> Von: samju [mailto:[EMAIL PROTECTED]
> Gesendet: Mo 23.07.2007 12:07
> An: user@shale.apache.org
> Betreff: Re: Passing data between a dialog and a subdialog
>
>
> your Question is illustrated under the following
> Thread:http://www.nabble.com/transition-between-2-Dialog-tf3885103.html#a11029950
> and here is the Solution: Graig wrote:
> "Two ideas for how to do this:
>
> * (As I mentioned in the previous response), store a
>   reference to your parent dialog's data object *separately*
>   in session scope so that it can be accessed directly.
>
> * Ensure that the subdialog receives the same data object
>   as the parent dialog does.  Note that it is not good enough
>   to have the same data *class*, you really need the same
>   *instance* of that class in order to share data.
>
> Craig
> "
> Sam
>
> marc.jaeckle wrote:
> >
> > Hi everybody,
> >
> > is there a way to pass data between a dialog and a subdialog in the basic
> > implementation or between a "dialog state" and a "subdialog state" of the
> > scxml implementation? I'm looking for something similar to the attribute
> > mappers that Spring Web Flow features. The idea is to treat the dialogs as
> > black boxes that have defined input and output values (I'm not talking
> > about string outcomes but actual business data here) so they can be reused
> > easily in different contexts.
> >
> > Example to illustrate the problem:
> > There is a partsDialog that displays information on car parts. The
> > partsDialog allows the user to open a subdialog to search for a specific
> > part of a car to display information on that part. The partsDialog
> > initializes the searchPart subdialog with the type of the car and the
> > searchPart subdialog returns a part number to the partsDialog when it is
> > done. The searchPart subdialog is also to be used as a subdialog in other
> > contexts.
> >
> > Gruß
> > Marc
> >
> >




Re: Passing data between a dialog and a subdialog

2007-07-23 Thread Rahul Akolkar

On 7/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

But is there also a way to do that in the xml dialog definition. Something like

   
  
  
   
   ...

(Web Flow example)




* Basic implementation:

  No, there isn't a declarative way to do that via the
dialog-config.xml. However, feel free to open an enhancement request
via JIRA [1] about making data flow easier / more elegant across
parent-child dialogs (if there isn't one already, please check
existing tickets).

* SCXML implementation:

  Subdialogs receive the same dialog data (same instance of data
class) so there is no need for any such elaborate mechanism.

-Rahul

[1] http://shale.apache.org/issue-tracking.html



Gruß
Marc


-Ursprüngliche Nachricht-
Von: samju [mailto:[EMAIL PROTECTED]
Gesendet: Mo 23.07.2007 12:07
An: user@shale.apache.org
Betreff: Re: Passing data between a dialog and a subdialog


your Question is illustrated under the following
Thread:http://www.nabble.com/transition-between-2-Dialog-tf3885103.html#a11029950
and here is the Solution: Graig wrote:
"Two ideas for how to do this:

* (As I mentioned in the previous response), store a
  reference to your parent dialog's data object *separately*
  in session scope so that it can be accessed directly.

* Ensure that the subdialog receives the same data object
  as the parent dialog does.  Note that it is not good enough
  to have the same data *class*, you really need the same
  *instance* of that class in order to share data.

Craig
"
Sam

marc.jaeckle wrote:
>
> Hi everybody,
>
> is there a way to pass data between a dialog and a subdialog in the basic
> implementation or between a "dialog state" and a "subdialog state" of the
> scxml implementation? I'm looking for something similar to the attribute
> mappers that Spring Web Flow features. The idea is to treat the dialogs as
> black boxes that have defined input and output values (I'm not talking
> about string outcomes but actual business data here) so they can be reused
> easily in different contexts.
>
> Example to illustrate the problem:
> There is a partsDialog that displays information on car parts. The
> partsDialog allows the user to open a subdialog to search for a specific
> part of a car to display information on that part. The partsDialog
> initializes the searchPart subdialog with the type of the car and the
> searchPart subdialog returns a part number to the partsDialog when it is
> done. The searchPart subdialog is also to be used as a subdialog in other
> contexts.
>
> Gruß
> Marc
>
>


AW: Passing data between a dialog and a subdialog

2007-07-23 Thread marc.jaeckle
But is there also a way to do that in the xml dialog definition. Something like

   
  
  
   
   ...

(Web Flow example)

Gruß
Marc


-Ursprüngliche Nachricht-
Von: samju [mailto:[EMAIL PROTECTED]
Gesendet: Mo 23.07.2007 12:07
An: user@shale.apache.org
Betreff: Re: Passing data between a dialog and a subdialog
 

your Question is illustrated under the following
Thread:http://www.nabble.com/transition-between-2-Dialog-tf3885103.html#a11029950
and here is the Solution: Graig wrote:
"Two ideas for how to do this: 

* (As I mentioned in the previous response), store a 
  reference to your parent dialog's data object *separately* 
  in session scope so that it can be accessed directly. 

* Ensure that the subdialog receives the same data object 
  as the parent dialog does.  Note that it is not good enough 
  to have the same data *class*, you really need the same 
  *instance* of that class in order to share data. 

Craig 
"
Sam

marc.jaeckle wrote:
> 
> Hi everybody,
> 
> is there a way to pass data between a dialog and a subdialog in the basic
> implementation or between a "dialog state" and a "subdialog state" of the
> scxml implementation? I'm looking for something similar to the attribute
> mappers that Spring Web Flow features. The idea is to treat the dialogs as
> black boxes that have defined input and output values (I'm not talking
> about string outcomes but actual business data here) so they can be reused
> easily in different contexts.
> 
> Example to illustrate the problem:
> There is a partsDialog that displays information on car parts. The
> partsDialog allows the user to open a subdialog to search for a specific
> part of a car to display information on that part. The partsDialog
> initializes the searchPart subdialog with the type of the car and the
> searchPart subdialog returns a part number to the partsDialog when it is
> done. The searchPart subdialog is also to be used as a subdialog in other
> contexts.
> 
> Gruß
> Marc
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Passing-data-between-a-dialog-and-a-subdialog-tf4128322.html#a11741044
Sent from the Shale - User mailing list archive at Nabble.com.




Re: Passing data between a dialog and a subdialog

2007-07-23 Thread samju

your Question is illustrated under the following
Thread:http://www.nabble.com/transition-between-2-Dialog-tf3885103.html#a11029950
and here is the Solution: Graig wrote:
"Two ideas for how to do this: 

* (As I mentioned in the previous response), store a 
  reference to your parent dialog's data object *separately* 
  in session scope so that it can be accessed directly. 

* Ensure that the subdialog receives the same data object 
  as the parent dialog does.  Note that it is not good enough 
  to have the same data *class*, you really need the same 
  *instance* of that class in order to share data. 

Craig 
"
Sam

marc.jaeckle wrote:
> 
> Hi everybody,
> 
> is there a way to pass data between a dialog and a subdialog in the basic
> implementation or between a "dialog state" and a "subdialog state" of the
> scxml implementation? I'm looking for something similar to the attribute
> mappers that Spring Web Flow features. The idea is to treat the dialogs as
> black boxes that have defined input and output values (I'm not talking
> about string outcomes but actual business data here) so they can be reused
> easily in different contexts.
> 
> Example to illustrate the problem:
> There is a partsDialog that displays information on car parts. The
> partsDialog allows the user to open a subdialog to search for a specific
> part of a car to display information on that part. The partsDialog
> initializes the searchPart subdialog with the type of the car and the
> searchPart subdialog returns a part number to the partsDialog when it is
> done. The searchPart subdialog is also to be used as a subdialog in other
> contexts.
> 
> Gruß
> Marc
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Passing-data-between-a-dialog-and-a-subdialog-tf4128322.html#a11741044
Sent from the Shale - User mailing list archive at Nabble.com.



Passing data between a dialog and a subdialog

2007-07-23 Thread marc.jaeckle
Hi everybody,

is there a way to pass data between a dialog and a subdialog in the basic 
implementation or between a "dialog state" and a "subdialog state" of the scxml 
implementation? I'm looking for something similar to the attribute mappers that 
Spring Web Flow features. The idea is to treat the dialogs as black boxes that 
have defined input and output values (I'm not talking about string outcomes but 
actual business data here) so they can be reused easily in different contexts.

Example to illustrate the problem:
There is a partsDialog that displays information on car parts. The partsDialog 
allows the user to open a subdialog to search for a specific part of a car to 
display information on that part. The partsDialog initializes the searchPart 
subdialog with the type of the car and the searchPart subdialog returns a part 
number to the partsDialog when it is done. The searchPart subdialog is also to 
be used as a subdialog in other contexts.

Gruß
Marc