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] custom tags
Date Tue, 25 Oct 2011 02:11:26 GMT
On Mon, Oct 24, 2011 at 1:36 PM, Micka <mickamusset@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 <jocke29@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 <jaugenstine@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


Mime
View raw message