commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ate Douma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SCXML-226) Support of special send targets #_parent and #_invokeid
Date Wed, 11 Feb 2015 23:27:11 GMT

    [ https://issues.apache.org/jira/browse/SCXML-226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14317195#comment-14317195
] 

Ate Douma commented on SCXML-226:
---------------------------------

[~hiu.phail] Thank you for this contribution!
Your timing is perfect :)
I've actually been working the last few days on an improvement in exactly the same area, although
so far only concerning #_parent support.
I do like your patch and it definitely helps! 
Your changes for the #_parent target in general match those of mine (high-level), but there
are a few differences...  

My changes (for #_parent) are more elaborate  because I also added additional support for
setting up the child SCXMLExecutor.
A child SCXMLExecutor should (as a default) also 'share' the same SCXMLSemantics implementation,
EventDispatcher, and ErrorReporter.
This requires that the Invoker (SimpleSCXMLInvoker) gets a reference to the 'parent' SCXMLExecutor
passed in.
All this resulted in a few other changes, one of which was dropping the no longer useful (too
limiting) InvokerManager interface!

Long story short: I am about to commit *my* changes for #_parent target support first, and
I think those changes will 'align' with your current usages.
As said: there are some more API changes and some different from your patch, but I think it
should be easy to adjust to those.

Once I've committed those, I'll rework your patch for the #_invokeid support and merge that
in as well.
If the end result is not providing or somehow limiting in what you need/expected, just let
me know and we can work out further adjustments or enhancements.

Thanks again for your contribution, and I'm looking forward for more :)

Regards, Ate

> Support of special send targets #_parent and #_invokeid
> -------------------------------------------------------
>
>                 Key: SCXML-226
>                 URL: https://issues.apache.org/jira/browse/SCXML-226
>             Project: Commons SCXML
>          Issue Type: Bug
>    Affects Versions: 0.5, 0.6, 0.7, 0.8, 0.9
>            Reporter: Michael Goerlich
>            Assignee: Ate Douma
>             Fix For: 2.0
>
>         Attachments: fix_invoke_special_targets
>
>
> Currently it is not possible to use #_parent and #_invokeid to allow communication between
two scxml instances where one invoked the other. 
> Due to the last changes the _ioprocessors variable was introduced. If the target of a
<send> may reference to an entry in the _ioprocessors map, then it should be possible
to forward events directly to the registered SCXMLIOProcessor instance.
> Given this the invoker must supply a SCXMLIOProcessor for the parent to register within
the its SCXMLExecutionContext map as #_invokeId and the invoker must register the parent SCXMLIOProcessor
as #_parent within the execution context of the SCXMLExecutor. As well as this the EventDispatcher
must take the SCXMLIOProcessor registered for the target from _ioprocessors.
> Based on my assumptions I tried to implement this and uploaded the patch to: http://pastebin.com/t855Ugs1
. Hope it helps.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message