commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abigail Gertner <gert...@mitre.org>
Subject [scxml] datamodel, custom actions and digester
Date Tue, 10 Aug 2010 23:11:58 GMT
Hi --

I have a couple of questions about using commons SCXML.

I am trying to use the datamodel within a state as a kind of template,
so when I enter the state, I will set some values within the datamodel
and then execute some code with the resulting data.

I was trying to use an <assign> statement within the state's <onentry>
tag and then use the onEntry() method of a Listener to do the additional
processing of the data, but I found that the listener did not get the
values that had been set by the assign statement as part of the
datamodel associated with its target node. It only gets the original
datamodel when I call target.getDatamodel() - not the version with the
updated values. Is this correct?

So, I think I need to use a custom action to do this. I think I have
figured out how to implement the custom action. My problem now is that
(for unrelated reasons) I am using a dispatcher obtained from
SCXMLParser.newInstance() to parse the scxml document and I don't know
how to include the custom action when I am doing it this way. In the
documentation for custom actions, it says that "the digester rules can
be added by directly by obtaining a Digester instance with the "default"
SCXML rules using the newInstance() methods and further directly adding
the necessary rules using the digester API." Can someone give me a bit
more information or an example on how to accomplish this?

Alternatively, if there is a way to do what I am trying to do (assign
some values to the data and then pass that data to a listener) without a
custom action I would like to know that too.

Thanks for your help

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


Mime
View raw message