commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <rahul.akol...@gmail.com>
Subject Re: [SCXML] Access current event payload in custom action?
Date Thu, 06 Apr 2006 17:20:39 GMT
On 4/6/06, Brule, Jon <Jon.Brule@xerox.com> wrote:
>
> Is it possible to access the current event payload from within a Custom
> Action?
<snip/>

Sure, the event payload is the value of the special variable named
"_eventdata" in the context of the state enclosing the custom action.

In a line of code, that translates to (within the execute() method of
the action):

Object payload = scInstance.getContext(getParentState()).get("_eventdata");


> More generically, is the current event accessible itself?
>
<snap/>

No, other than the payload, the SCXML WD has no comments. But there is
not much else of interest in the current event other than the payload
(and none that in a worst case scenario, cannot be communicated
redundantly via the payload).

-Rahul


> Regards,
> Jon Brule
> tricolorcat@gmail.com
>

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


Mime
View raw message