You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by jonathan augenstine <ja...@gmail.com> on 2010/12/13 07:40:45 UTC

[SCXML] custom tags

I am investigating using the SCXML to implement a telephony state machine.
 I need to be able to add custom tags and actions.  I see examples of adding
custom actions, but no examples of adding custom tags.  Can someone point me
in the direction of how to accomplish that task?

Jonathan

Re: [SCXML] element

Posted by Rahul Akolkar <ra...@gmail.com>.
On Wed, Oct 26, 2011 at 9:59 AM, Dark.Rider85 <da...@yahoo.de> wrote:
> Hi!
> I dealt with the <invoke> element of scxml a little. That element is used to
> call external services. I was thinking about calling an external service of
> the type "scxml" but I have no idea how to do that properly.
<snip/>

Type "scxml" is reserved and has specific semantics of invoking
another state machine. If your external service isn't one, you should
use a different type that you define and register an Invoker
implementation for that type with the executor.


> I consulted the
> working draft but it did not really help me. I have problems in
> understanding the way to use it. Do I have to provide an implementation
> which extends "Invoke"? Is there any simple example which illustrates the
> proper use of the invoke element? Or should I use another way to call that
> external service of the type scxml?
>
<snap/>

The interface is called org.apache.commons.scxml.invoke.Invoker, you
can read more here [1] and click on the "Frames" click top right to
browse the rest of that Java package.

-Rahul

[1] http://commons.apache.org/scxml/0.9/apidocs/org/apache/commons/scxml/invoke/Invoker.html


> Thanks in advance!
>
> Best regards
>

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


[SCXML] element

Posted by "Dark.Rider85" <da...@yahoo.de>.
Hi!
I dealt with the <invoke> element of scxml a little. That element is 
used to call external services. I was thinking about calling an external 
service of the type "scxml" but I have no idea how to do that properly. 
I consulted the working draft but it did not really help me. I have 
problems in understanding the way to use it. Do I have to provide an 
implementation which extends "Invoke"? Is there any simple example which 
illustrates the proper use of the invoke element? Or should I use 
another way to call that external service of the type scxml?

Thanks in advance!

Best regards

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


Re: [SCXML] custom tags

Posted by Rahul Akolkar <ra...@gmail.com>.
On Mon, Oct 24, 2011 at 1:36 PM, Micka <mi...@gmail.com> wrote:
> Hi,
>
>
> I also really like customActions.
>
> But right Now, i'm trying to figure out how to use ExternalContent .
>
> The document say that I have to implements it, but .... I really don't
> understand how to use it, I mean i get :
>
>
> class myclass extends Action implements ExternalContent
>  .....
> .....
> ..
>    @Override
>    public List getExternalNodes() {
>
>        return null;
>    }
> }
>
<snip/>

The nodes list is populated by the parser for you, you don't have to
implement above method rather you may use it to retrieve the contained
nodes like so:

  public void execute(...) {
      List nodes = getExternalNodes();
      // do something with contained nodes list
  }

-Rahul


>
> thx,
>
> On Mon, Dec 13, 2010 at 9:28 AM, jocke eriksson <jo...@gmail.com> wrote:
>
>> Hej jonathan I have done a telephony state machine, and commons scxml
>> was a perfect choice for handling the logic. Custom actions and custom
>> tags are the same thing.
>>
>> register your action like this.
>> List<CustomAction> actions ....
>> actions.add(new CustomAction(NAME_SPACE, "menu", MenuAction.class));
>> SCXMLParser.parse(document, errHandler, actions);
>>
>> And menu action is a class that have getters and setters for choices
>> maxtime and value.
>>
>> <ms:menu choices="'123"  maxtime="30s" value="main-menu.wav'" />
>>
>> If you need anymore help don't be afraid to ask
>>
>> Regards Jocke
>>
>> 2010/12/13 jonathan augenstine <ja...@gmail.com>:
>> > I am investigating using the SCXML to implement a telephony state
>> machine.
>> >  I need to be able to add custom tags and actions.  I see examples of
>> adding
>> > custom actions, but no examples of adding custom tags.  Can someone point
>> me
>> > in the direction of how to accomplish that task?
>> >
>> > Jonathan
>> >
>>

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


Re: [SCXML] custom tags

Posted by Micka <mi...@gmail.com>.
Hi,


I also really like customActions.

But right Now, i'm trying to figure out how to use ExternalContent .

The document say that I have to implements it, but .... I really don't
understand how to use it, I mean i get :


class myclass extends Action implements ExternalContent
 .....
.....
..
    @Override
    public List getExternalNodes() {

        return null;
    }
}


thx,

On Mon, Dec 13, 2010 at 9:28 AM, jocke eriksson <jo...@gmail.com> wrote:

> Hej jonathan I have done a telephony state machine, and commons scxml
> was a perfect choice for handling the logic. Custom actions and custom
> tags are the same thing.
>
> register your action like this.
> List<CustomAction> actions ....
> actions.add(new CustomAction(NAME_SPACE, "menu", MenuAction.class));
> SCXMLParser.parse(document, errHandler, actions);
>
> And menu action is a class that have getters and setters for choices
> maxtime and value.
>
> <ms:menu choices="'123"  maxtime="30s" value="main-menu.wav'" />
>
> If you need anymore help don't be afraid to ask
>
> Regards Jocke
>
> 2010/12/13 jonathan augenstine <ja...@gmail.com>:
> > I am investigating using the SCXML to implement a telephony state
> machine.
> >  I need to be able to add custom tags and actions.  I see examples of
> adding
> > custom actions, but no examples of adding custom tags.  Can someone point
> me
> > in the direction of how to accomplish that task?
> >
> > Jonathan
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Re: [SCXML] custom tags

Posted by jonathan augenstine <ja...@gmail.com>.
Jocke,

Thank you for the response.  I am certain I will have further questions.

Jonathan

On Mon, Dec 13, 2010 at 12:28 AM, jocke eriksson <jo...@gmail.com> wrote:

> Hej jonathan I have done a telephony state machine, and commons scxml
> was a perfect choice for handling the logic. Custom actions and custom
> tags are the same thing.
>
> register your action like this.
> List<CustomAction> actions ....
> actions.add(new CustomAction(NAME_SPACE, "menu", MenuAction.class));
> SCXMLParser.parse(document, errHandler, actions);
>
> And menu action is a class that have getters and setters for choices
> maxtime and value.
>
> <ms:menu choices="'123"  maxtime="30s" value="main-menu.wav'" />
>
> If you need anymore help don't be afraid to ask
>
> Regards Jocke
>
> 2010/12/13 jonathan augenstine <ja...@gmail.com>:
> > I am investigating using the SCXML to implement a telephony state
> machine.
> >  I need to be able to add custom tags and actions.  I see examples of
> adding
> > custom actions, but no examples of adding custom tags.  Can someone point
> me
> > in the direction of how to accomplish that task?
> >
> > Jonathan
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Re: [SCXML] custom tags

Posted by jocke eriksson <jo...@gmail.com>.
Hej jonathan I have done a telephony state machine, and commons scxml
was a perfect choice for handling the logic. Custom actions and custom
tags are the same thing.

register your action like this.
List<CustomAction> actions ....
actions.add(new CustomAction(NAME_SPACE, "menu", MenuAction.class));
SCXMLParser.parse(document, errHandler, actions);

And menu action is a class that have getters and setters for choices
maxtime and value.

<ms:menu choices="'123"  maxtime="30s" value="main-menu.wav'" />

If you need anymore help don't be afraid to ask

Regards Jocke

2010/12/13 jonathan augenstine <ja...@gmail.com>:
> I am investigating using the SCXML to implement a telephony state machine.
>  I need to be able to add custom tags and actions.  I see examples of adding
> custom actions, but no examples of adding custom tags.  Can someone point me
> in the direction of how to accomplish that task?
>
> Jonathan
>

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