Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 50920 invoked from network); 5 Mar 2009 18:03:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Mar 2009 18:03:59 -0000 Received: (qmail 10511 invoked by uid 500); 5 Mar 2009 18:03:56 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 10460 invoked by uid 500); 5 Mar 2009 18:03:55 -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 10449 invoked by uid 99); 5 Mar 2009 18:03:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2009 10:03:55 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rahul.akolkar@gmail.com designates 74.125.92.148 as permitted sender) Received: from [74.125.92.148] (HELO qw-out-1920.google.com) (74.125.92.148) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2009 18:03:49 +0000 Received: by qw-out-1920.google.com with SMTP id 9so40051qwj.60 for ; Thu, 05 Mar 2009 10:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=vxPPISQjppFBd2oQLjox0iJQFkVDvf7w7LMLB1YFjPQ=; b=IHCa0YfOI34ABNY2CmNiZrraWGcDRI/BUpu3Cpsmx653oUv6Y9vLt7ejlGrre14fEr cvlMQ3hWtg1GyvWMnEOOI6ckavEnyPrDFmUjlv0+Fhe49xnrZVcP2YjXYgh5Cnqd3/aZ UWjii+rRb48fOTSJXhpQWdAv8oKiK5+ztjFn8= 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=rgBrRKfORZRAjCg/dusbJ5vSeDUFhN3RwTGpHw5X8yx/bQX7+aAwpcROmudR15SGXt q3Emd/JyFZB3bSvwn5eZULAK1BYBRK8CvJ4mvzl2IFzLzJhUsZnLeOklnsi7UfJ1RsYB v7zQoLlwKCd3u6koFi+XFZ6gAi0l1iwA7fUdU= MIME-Version: 1.0 Received: by 10.229.96.142 with SMTP id h14mr865087qcn.99.1236276196322; Thu, 05 Mar 2009 10:03:16 -0800 (PST) In-Reply-To: References: Date: Thu, 5 Mar 2009 13:03:16 -0500 Message-ID: Subject: Re: [SCXML] more Evaluator/Context questions From: Rahul Akolkar To: Commons Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Mar 5, 2009 at 11:33 AM, Linda Erlenhov wrote: > Hello! > > This is my plan: > My guards are boolean expressions and the boolean variables that the > expression consists of are updated in "onEntry"/"onExit". I use a listner > for _when_ the update should be done. > Its better to model the state machine in as much completeness as possible using an SCXML document. Investigate whether you actually need to use a listener. See the canonical microwave samples or any datamodel test cases for examples of updates during and , here are the JEXL variants: http://svn.apache.org/repos/asf/commons/proper/scxml/trunk/src/test/java/= org/apache/commons/scxml/env/jexl/ > The trouble is that I=B4m not shure _where/how_ the updating is done. Sin= ce > this should be done during runtime a guess is that it is some kind of upd= ate > in the context, but I have clearly not understood properly how this > (context) =A0works. > The Java API merely serves to support the mechanics of SCXML execution. Whether you need to understand it really depends on the nature of the usecase. Often, is sufficient for updating data model variables etc. > So if I create a simple example then maybe someone could use it to explai= n > this to me: > > The statemachine has three states. A, B and C. There are transitions betw= een > A & B both ways, and also transitions between B & C both ways. You can > trigger events that are "go to A", "go to B" "go to C". You start in A. O= n > the transition from B to A there is a guard for "been in C" that is set w= hen > you visit C. So you have to visit C atleast once before you enter state A > the second time. > > A<=3D>B<=3D>C > > How/where do I set the "been in C" state to true when i enter the state? > IIUC, use the 'beenInC' variable below in the guard condition for entering A the second time: ... ... -Rahul > > Best Regards > > //Linda > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org