You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Brule, Jon" <Jo...@xerox.com> on 2006/04/06 19:00:11 UTC

[SCXML] Access current event payload in custom action?

Is it possible to access the current event payload from within a Custom
Action? More generically, is the current event accessible itself?

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


Re: [SCXML] Access current event payload in custom action?

Posted by Rahul Akolkar <ra...@gmail.com>.
On 4/6/06, Brule, Jon <Jo...@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


Re: [SCXML] Access current event payload in custom action?

Posted by Rahul Akolkar <ra...@gmail.com>.
On 4/6/06, Fasih <fa...@baypackets.com> wrote:
> Should be. I am writing a code assuming that it does. Using the evaluator to
> evaluate _eventdata.somedata for me.
>
<snip/>

Thanks Fasih, that reminds me -- Jon, you'll need nightlies 20060404
or later. See this post from a couple of days ago [1].

-Rahul

[1] http://marc.theaimsgroup.com/?l=jakarta-commons-user&m=114409590931510&w=2


> +Fasih
> ----- Original Message -----
> From: "Brule, Jon" <Jo...@xerox.com>
> To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
> Sent: Thursday, April 06, 2006 12:00 PM
> Subject: [SCXML] Access current event payload in custom action?
>
>
>
> Is it possible to access the current event payload from within a Custom
> Action? More generically, is the current event accessible itself?
>
> 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


Re: [SCXML] Access current event payload in custom action?

Posted by Fasih <fa...@baypackets.com>.
Should be. I am writing a code assuming that it does. Using the evaluator to 
evaluate _eventdata.somedata for me.

+Fasih
----- Original Message ----- 
From: "Brule, Jon" <Jo...@xerox.com>
To: "Jakarta Commons Users List" <co...@jakarta.apache.org>
Sent: Thursday, April 06, 2006 12:00 PM
Subject: [SCXML] Access current event payload in custom action?



Is it possible to access the current event payload from within a Custom
Action? More generically, is the current event accessible itself?

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




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