Closed ThomasDaheim closed 4 years ago
have u tried following ways? // since 0.3.1 // the same effect as add method transitFromAnyToCOnToC in your state machine builder.transit().fromAny().to("C").on("ToC").callMethod("fromAnyToC"); // the same effect as add method transitFromBToAnyOnToC in your state machine builder.transit().from("B").toAny().on("ToC").callMethod("fromBToAny"); // the same effect as add method transitFromBToAny in your state machine builder.transit().from("B").toAny().onAny().callMethod("fromBToAny");
Have just tried it in both ways:
@Transitions({ @Transit(from="*", to="*", on="*", callMethod="handleTransition") })
and
myBuilder.transit().fromAny().toAny().onAny().callMethod("handleTransition");
Nut the function isn't called :-( Not sure if I would need to do anything else? I'm running 0.3.8...
there should be various listener can satisfied ur requirements, like Polymorphism Event Dispatch part
Bingo! That worked like a charm.
Hi,
I was looking for a way to generically define a method that is called for any transition between states independent of the action.
Currently, I have to loop through all possible combinations to call myBuilder.externalTransition().... to set the same method in all cases. Is there a way to set this only once such that its used in any case?
Thanks in advance, Thomas