commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
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 <> wrote:
> Is it possible to access the current event payload from within a Custom
> Action?

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?

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).


> Regards,
> Jon Brule

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message