You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by amina mimouni <am...@gmail.com> on 2008/07/07 11:17:08 UTC
[SCXML]invoke method with arguments
Hello,
I have question about how invoking method with argument in scxml by Java
libraries or xml declaration
regards,
Amina
Re: [SCXML]invoke method with arguments
Posted by Javier RodrÃguez Escolar <ja...@gmail.com>.
Hello,
I don't know if it represents the best possible option, but one alternative
could be as follows:
-Create a custom action (i.e InvokeMethod) extending from Action and
implementing the ExternalContent interface.
-Implement the "execute" method so as it takes all the attributes defined in
the InvokeMethod element (class name, method name, ...) and use the
Java.lang.Class to call this method. Extending from ExternalContent will
allow you define the arguments as child nodes in the SCXML definition and
get them as a list of (external namespaced) child nodes in your "execute"
method.
Regards,
Javi.
2008/7/7 amina mimouni <am...@gmail.com>:
> Hello,
>
> I have question about how invoking method with argument in scxml by Java
> libraries or xml declaration
>
> regards,
>
> Amina
>