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] Telephony/SCXML application question
Date Tue, 04 Jan 2011 23:42:31 GMT
On Mon, Jan 3, 2011 at 5:32 PM, jonathan augenstine
<jaugenstine@gmail.com> wrote:
> The caching response is exactly what I was looking for, avoid repetitive
> retrieval and parsing.  That is great news.  On the second note about
> Invoke.  I am starting to understand that feature but have a question.  When
> you execute Invoke you pass it the context of the parent, I assume for
> passing the events back and forth,
<snip/>

Correct, so the invoked state machine (or process, in general) can
have a handle back to the parent and its context.


> but if the target type is SCXML does it
> launch another SCXML parse engine or does it parse in the context of the
> parent engine?
<snap/>

Its a separate parse and execution in a new context (this is what the
default semantics for the "scxml" invoke type are). Clearly, its
possible to alter the parsing or other behavior either by subclassing
the default scxml invoker or implementing one anew if different
semantics are desired -- and in such a case, best to use an
application specific invoker type.

-Rahul


>
> Jonathan
>
> On Mon, Dec 20, 2010 at 12:24 PM, Rahul Akolkar <rahul.akolkar@gmail.com>wrote:
>
>> On Mon, Dec 20, 2010 at 1:09 PM, jocke eriksson <jocke29@gmail.com> wrote:
>> > Is there a standard way to cache all of these dialogs?
>> > You can create a new statemachine from an already parsed scxml
>> > document, so yes you can reuse parsed documents.
>> >
>> <snip/>
>>
>> Right, if the question about caching is from the PoV of avoiding
>> repetitive parsing, the parsed SCXML object model can be reused across
>> any number of executors.
>>
>>
>> > How do handle the situation where I need to launch a sub-dialog?
>> > Well this is a tricky one, it does not exist an equivalent to a vxml
>> > subdialog, you can transition to a new document but this document
>> > was resolved when the statemachine was created. You could of course
>> > implement this your self by launching a new statemachine with a custom
>> > action (tag)
>> >
>> <snap/>
>>
>> Or a custom invoker, <invoke> semantics are closer to VXML subdialogs
>> than custom actions. See the Commons SCXML Invoker [1] interface -- a
>> simple example implementation is the SimpleSCXMLInvoker available in
>> the distro, adjust to taste for your usecase.
>>
>> -Rahul
>>
>> [1]
>> http://commons.apache.org/scxml/0.9/apidocs/org/apache/commons/scxml/invoke/Invoker.html
>>
>>
>> > Regards Jocke.
>> >
>> > 2010/12/20 jonathan augenstine <jaugenstine@gmail.com>:
>> >> A task that I have been unable to answer at this point is the following.
>> >>  How do handle the situation where I need to launch a sub-dialog.  For
>> >> instance, in a telephony application, you might receive an inbound call
>> and
>> >> launch an SCXML doc associated with that ANI or DNIS phone number
>> reported.
>> >>  After starting the script, you might collect DTMF and then retrieve
>> another
>> >> SCXML doc based on the DTMF entry.  My specific question is how do
>> handle
>> >> that sub-dialog?  Also, is there a standard way to cache all of these
>> >> dialogs?
>> >>
>> >> Jonathan
>> >>
>> >

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


Mime
View raw message