On 2/14/06, Marc Robitaille <[EMAIL PROTECTED]> wrote: > We are trying to use ccxml executable content inside scxml documents > (this is defined here: "http://www.w3.org/TR/scxml/#executable"). > > Does the commons-scxml project have hooks to define and parse arbitrary > executable content included in a namespace (i.e. <ccxml:>) ? <snip/>
Hi Marc, Back in December, the thinking was: <paste> (Commons SCXML) 1.0.0 will not implement any functionality dealing with external namespaces. For example, CCXML constructs as shown in some of the examples in the specification will have to be made by suitable EventDispatcher implementations (EventDispatcher is a Commons SCXML interface), these will not be provided out of the box. </paste> That full post is archived here [1], amongst other places. The thinking still holds, so if you try the document that you've posted below (seems you already have) with the Commons SCXML nightlies, the CCXML namespace element(s) will simply be ignored. More importantly, given that you want to use CCXML elements as custom actions in the executable content in SCXML documents, atleast a couple of options come to mind: 1) As mentioned in the section of the specification WD you refer to above, you can alternatively use the SCXML <send> element to achieve similar results. The callback will be received on the EventDispatcher that you supply to the SCXMLExecutor -- see this API note [2] -- and therefore, you will need to provide an EventDispatcher implementation that proxies the <ccxml:createcall ... /> element (and for all the other targettype and event attributes that interest you). 2) If using the SCXML <send> element is not an acceptable solution, then I'll get back to the actual question you asked ;-) The "hooks" are already in place, but do bear in mind that using those hooks requires additional development. Two things will need to be done: (a) Customize the digester rules -- obtain a configured Digester using the newInstance() method [3] -- and configure it to parse any additional elements. You will need to know Commons Digester [4] a bit to do that. (b) Supply your own SCXMLSemantics -- see the four argument constructor for the SCXMLExecutor [5] -- your SCXMLSemantics implementation only needs to provide its own implementation of the executeActionList() method in the default implementation in order to augment it to support any "custom actions" that you need (you can just subclass the default impl and override that bit). Please send an update if you make progress on this or have any further comments. I expect this to become a popular question :-) -Rahul [1] http://marc.theaimsgroup.com/?l=jakarta-commons-dev&m=113511763426847&w=2 [2] http://jakarta.apache.org/commons/sandbox/scxml/api-notes/core-engine.html [3] http://jakarta.apache.org/commons/sandbox/scxml/apidocs/org/apache/commons/scxml/io/SCXMLDigester.html [4] http://jakarta.apache.org/commons/digester/ [5] http://jakarta.apache.org/commons/sandbox/scxml/apidocs/org/apache/commons/scxml/SCXMLExecutor.html > Our scxml > document is bellow: > > <?xml version="1.0"?> > <scxml xmlns="http://www.w3.org/2005/07/SCXML" > ccxml="http://www.w3.org/2002/09/ccxml" > version="1.0" > initialstate="dialing"> > > <state id="dialing"> > <onentry> > <ccxml:createcall dest="'tel:+18315552020'" /> > </onentry> > <transition> > ... > </transition> > </state> > </scxml> > > Thank you! > > Marc > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
