I'm working with Apache Commons SCXML 0.9 and I can't find how to add a CustomAction. I've found examples using v2.0-SNAPSHOT (which by the way I don't know where to get it), but it seems that doesn't work on v0.9, so far I got something like this:
CustomAction customAction = new CustomAction("http://my.custom-actions.domain/CUSTOM", "my", MyCustomAction.class);
List<CustomAction> customActions = new ArrayList<CustomAction>();
customActions.add(customAction);
For v2.0-SNAPSHOT I could write:
SCXML scxml = SCXMLTestHelper.parse("path/to/my/sm.xml", customActions);
and after that, get a SCXMLExecutor
and call the SCXMLExecutor.go
method, but I can't find any option for v0.9, please I need your help here.
Best regards
Well, I think I got it, I've found this post where there is a full example (in spanish) using SCXML v0.9.
Here is the code I've wrote to add a custom action
onExit
:and if you want to register an
onEntry
action, is almost the same: