You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "R.C. Hoekstra" <r....@erasmusmc.nl> on 2016/03/17 22:03:39 UTC
scxml: nested custom actions
Hi Ate, Woonsan,
Is there a way to access nested child actions from a parent custom action in scxml?
In version scxml-2.0-M1 I could do this in the onexecute of a custom action:
for (Action action : getParent().getActions()) {
if (action instanceof MyChildAction) {
// do things with child action
In M1 the Executable.getActions() would list all actions, also the nested child actions contained in a parent action. In the most recent code the Executable.getActions() only lists the parent action, NOT it's children.
I want to do something like this:
<onentry>
<ntd:parentAction>
<ntd:childAction ... />
<ntd:childAction .../>
</ntd:parentAction>
</onentry>
So how to access the childActions from the parentAction's onExecute?
thanks in advance,
Rinke
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: scxml: nested custom actions
Posted by Woonsan Ko <wo...@apache.org>.
Hi Rinke / Ate,
It looks like it has been changed as of SCXML-213 [1] with commit
eba2b2899787ef0476c1dd8852aba5b0adb4f5f3.
SCXMLReader#readCustomAction() seems to ignore the possibility of
nested custom actions by invoking #skipToEndElement(reader).
@Ate, is it probably a regression? (custom actions are commons-scxml
specific, not having to be compliant with scxml spec)
Regards,
Woonsan
[1] https://issues.apache.org/jira/browse/SCXML-213
On Thu, Mar 17, 2016 at 5:03 PM, R.C. Hoekstra
<r....@erasmusmc.nl> wrote:
> Hi Ate, Woonsan,
>
> Is there a way to access nested child actions from a parent custom action in scxml?
>
> In version scxml-2.0-M1 I could do this in the onexecute of a custom action:
>
> for (Action action : getParent().getActions()) {
> if (action instanceof MyChildAction) {
> // do things with child action
>
>
> In M1 the Executable.getActions() would list all actions, also the nested child actions contained in a parent action. In the most recent code the Executable.getActions() only lists the parent action, NOT it's children.
>
>
> I want to do something like this:
>
> <onentry>
> <ntd:parentAction>
> <ntd:childAction ... />
> <ntd:childAction .../>
> </ntd:parentAction>
> </onentry>
>
> So how to access the childActions from the parentAction's onExecute?
>
>
> thanks in advance,
>
> Rinke
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org