commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <>
Subject Re: [scxml] invoking methods on an object
Date Mon, 03 Oct 2011 22:55:26 GMT
On Mon, Oct 3, 2011 at 9:17 AM, Daniel Luis dos Santos
<> wrote:
> Hello,
> I am beggining to use commons-SCXML. For now I created a generic class that wraps the
library's code just like the class AbstractStateMachine in the stopwatch example.
> Each class from my application that will be governed by a state machine has an instance
of this, and has methods to trigger events on it.

Note that the AbstractStateMachine pattern is a starter pattern and is
limited if used in isolation. More patterns here:

> What I want to do is have methods from the object be called from state machine events.
For example, when I enter a state I want to be able to call a method on the stateful object.
> I am trying to use invoke inside <onentry> but the markup is ignored. How can I
do this ?

If you're talking about the <invoke> element, that is not an action
(its a child of state not onentry) and requires Invoker
implementations to be registered with the executor for each "type" of

If you want to call arbitrary Java methods within <onentry>, best to
write a custom action for that. More on that here:


> I am using version 0.9 from maven central.
> Thanks
> Daniel Santos

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message