You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Woonsan Ko <wo...@yahoo.com> on 2013/12/09 14:20:22 UTC

[SCXML] More customizable SCXMLReader?

Hi,

I'd like to load/initialize SCXML custom actions more dynamically in my project. For example, I want to create custom actions at runtime from other platform specific task/action definitions or some other scripted tasks.

The current SCXMLReader#readCustomAction() instantiates custom actions and set attributes by itself and furthermore SCXMLReader seems to have been designed just as a utility class with all the static operations, which makes it difficult to customize some operations for use cases like mine.

To be more supportive, I think it can be changed like the following:

- All the core operation code should be moved into instance methods;
- The existing static *read()* operations can still be supported by invoking on an instance instead;
- So, developers can use an SCXMLReader instance for an advanced control, but they can still simply use the existing static *read()* operations.

In my use case, if the custom action loading/setting code in #readCustomAction() is moved into a protected instance method, then maybe I can create platform specific (bridging) custom actions more easily just by overriding that operation.


I think this approach (moving static utility style code to instance level code) is one of the easiest and safest solution in the shorter term (v2.0).
By the way, if this approach sounds okay to you, then I'd like to change the SCXMLWriter accordingly as well.

What do you think?

Kind regards,

Woonsan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org