Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 596FB4821 for ; Sat, 21 May 2011 22:48:58 +0000 (UTC) Received: (qmail 69861 invoked by uid 500); 21 May 2011 22:48:57 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 69778 invoked by uid 500); 21 May 2011 22:48:57 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 69769 invoked by uid 99); 21 May 2011 22:48:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 May 2011 22:48:57 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rahul.akolkar@gmail.com designates 74.125.82.171 as permitted sender) Received: from [74.125.82.171] (HELO mail-wy0-f171.google.com) (74.125.82.171) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 May 2011 22:48:52 +0000 Received: by wyb32 with SMTP id 32so3859286wyb.30 for ; Sat, 21 May 2011 15:48:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=/4SH6EFkOjbnrydLV0t4xirNNPhK1D7t3WVd0OsvLSY=; b=Cl5Gcyoc6AzAAlMH1WnZtYPPG1aqdesCl+CItsBUt8aVaUtd72gLGVyKJUQ3Nw8nA3 v1iUcTZEgxOYVPdZnDk3RobA40qyYsW4BHwuYmD/uX7hb30SoAHUFgBrtHqqbYeZC2s6 WQ9DMbVBKNnMlc1kJaQ/5jPmA4ZPCH6nLe8kM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=CiPRV5kHhnEhZ680FO2dPamrQxjRlj1L93qArpq6+gZoY5zviAg37k+GFGnhyZdifI XFC871C0setlkGzX3Du1r7Yr8e1nMLC/I6QHw3or2/DuaTlzbonaAG+h1gGmo2lW19BD oYEylGyIWf9f6EDHQ2L74vqIPUSFkkNB/zjzM= MIME-Version: 1.0 Received: by 10.216.141.1 with SMTP id f1mr890783wej.35.1306018110654; Sat, 21 May 2011 15:48:30 -0700 (PDT) Received: by 10.216.187.80 with HTTP; Sat, 21 May 2011 15:48:30 -0700 (PDT) In-Reply-To: References: <725366.61224.qm@web39403.mail.mud.yahoo.com> Date: Sat, 21 May 2011 18:48:30 -0400 Message-ID: Subject: Re: [scxml] Trigger "complicated" events From: Rahul Akolkar To: Commons Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Sat, May 21, 2011 at 4:41 PM, Artem Vovk wro= te: > Hi, > > =A0 =A0 =A0 =A0In the document about Authoring Applications for the Multi= modal Architecture(http://www.w3.org/TR/mmi-auth/), I have noticed an inter= esting tag : > > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 _event.data..@status.toString() =3D=3D 'success'" target= =3D"echoColor"/> > =A0 =A0 =A0 > =A0 =A0 =A0 > =A0 =A0 > > It looks that a data was send with the event and one can access this data= with _event.data... =A0. How can I send such events from commons scxml to = scxml document?(with method fireEvent(String event) I can fire only the eve= nt name, without data) > When you instantiate the TriggerEvent, use the three argument constructor to add event payload: http://commons.apache.org/scxml/0.9/apidocs/org/apache/commons/scxml/Trig= gerEvent.html#TriggerEvent(java.lang.String, int, java.lang.Object) Then, you may refer to the payload Object as _eventdata (in v0.9, in next release it will change to _event.data as the spec now requires). Here is an example from the test suite that uses event payload to determine transitions to follow; so you can look up syntax (see parent directory for more samples, syntax depends on EL in use): http://svn.apache.org/repos/asf/commons/proper/scxml/trunk/src/test/java/= org/apache/commons/scxml/env/jexl/eventdata-02.xml -Rahul > Cheers, > Artem --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org