scxml: nested custom actions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

scxml: nested custom actions

rinke
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: scxml: nested custom actions

Woonsan Ko-3
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
<[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]