Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 65908 invoked from network); 11 Apr 2008 20:35:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Apr 2008 20:35:00 -0000 Received: (qmail 68375 invoked by uid 500); 11 Apr 2008 20:34:57 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 68047 invoked by uid 500); 11 Apr 2008 20:34:56 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 68038 invoked by uid 99); 11 Apr 2008 20:34:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2008 13:34:56 -0700 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: local policy) Received: from [151.190.254.12] (HELO edge.itt.com) (151.190.254.12) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2008 20:34:14 +0000 Received: from fwexhub5.itt.net (10.32.76.115) by edge.itt.com (10.32.16.12) with Microsoft SMTP Server (TLS) id 8.1.263.0; Fri, 11 Apr 2008 16:31:35 -0400 Received: from FWETGSMTP2.itt.net (10.32.77.201) by fwexhub5.itt.net (10.32.76.115) with Microsoft SMTP Server id 8.1.263.0; Fri, 11 Apr 2008 16:34:25 -0400 Received: from fwdefsmtp2.de.ittind.com ([10.32.77.203]) by FWETGSMTP2.itt.net with Microsoft SMTPSVC(6.0.3790.3959); Fri, 11 Apr 2008 16:34:25 -0400 Received: from vnexch01.gilfillan.de.ittind.com ([10.33.168.20]) by fwdefsmtp2.de.ittind.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 11 Apr 2008 16:34:25 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: [SCXML] W3C specs compatibility and state transition issues Date: Fri, 11 Apr 2008 13:34:24 -0700 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SCXML] W3C specs compatibility and state transition issues Thread-Index: Acibc9Ywg8NNPtBZQaGfXuWm1XutnwAi6Nyg References: From: "Ouyang, Landon - ES/RDR -Gil" To: Jakarta Commons Users List X-OriginalArrivalTime: 11 Apr 2008 20:34:25.0093 (UTC) FILETIME=[6E6BCF50:01C89C13] X-Virus-Checked: Checked by ClamAV on apache.org Hi Rahul, Thanks for the quick and helpful response. I am still having trouble creating a conditional state transition. Using your example, I added a conditional transition in my XML file as follows: 0 My handler for state 6 is the following: public void six(){ getEngine().getRootContext().set("result.value", "1"); } I have a NEXT button in my GUI that fires off the 'display.next' event. In state 5, I hit this NEXT button and this code gets executed. I would assume that when I hit the NEXT button again I should be in state 0, but instead I stay in state 6 indefinitely! Can you tell me what I am doing wrong? -- Landon Ouyang Member Technical Staff ITT Electronics Systems, Radar Systems - Gilfillan 7821 Orion Ave, Van Nuys, CA 91406 (818) 901-2982 -----Original Message----- From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] Sent: Thursday, April 10, 2008 6:22 PM To: Jakarta Commons Users List Subject: Re: [SCXML] W3C specs compatibility and state transition issues On Thu, Apr 10, 2008 at 8:30 PM, Ouyang, Landon - ES/RDR -Gil wrote: > Apologize for the duplicate e-mail, I had to be schooled on the proper format by Mr. Cooper. :) > > > I am a new user of Commons SCXML. I have two very basic questions: > > 1) How much of the W3C specs for SCXML is supported with Common SCXML? Are all of the tags recognized? > Not supported: (supporting this one is optional for engines) Experimental (due to missing pieces in draft spec, see TBD markers for example): > 2) Basing my code off of the simple stopwatch example, I created a simple Java app that navigated across 10 states. I noticed that if I put any code in the state handler methods that fires off events to transition to other states, the application still thinks I am in the *previous* state! For example, if I am in the state 5 subroutine and fire off an EVENT_NEXT event to go to state 6, the app actually keeps me in state 5 because it still thinks I am in state 4! Is it true that the state machine transitions *after* the handler for the new state is called? If so, how do I put custom code so that the state can make transition decisions based on certain conditions? > You'd have to do that asynchronously (the executor is still processing the earlier event). However ... I'd store the result of "certain conditions" in the datamodel, and query the datamodel later, like so: public void foo() { // handler for state "foo" // check certain conditions, create someresultbean getEngine().getRootContext().put("fooresult", someresultbean); } And further, in a totally fictitious example: -Rahul > > > -- > Landon Ouyang > Member Technical Staff > ITT Electronics Systems, Radar Systems - Gilfillan > 7821 Orion Ave, > Van Nuys, CA 91406 > (818) 901-2982 > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org This e-mail and any files transmitted with it may be proprietary and are in= tended solely for the use of the individual or entity to whom they are addr= essed. If you have received this e-mail in error please notify the sender. = Please note that any views or opinions presented in this e-mail are solely = those of the author and do not necessarily represent those of ITT Corporati= on. The recipient should check this e-mail and any attachments for the pres= ence of viruses. ITT accepts no liability for any damage caused by any viru= s transmitted by this e-mail. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org