Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 14547 invoked from network); 4 Sep 2010 17:44:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Sep 2010 17:44:46 -0000 Received: (qmail 87988 invoked by uid 500); 4 Sep 2010 17:44:45 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 87874 invoked by uid 500); 4 Sep 2010 17:44:45 -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 87865 invoked by uid 99); 4 Sep 2010 17:44:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Sep 2010 17:44:45 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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, 04 Sep 2010 17:44:38 +0000 Received: by wya21 with SMTP id 21so3223481wya.30 for ; Sat, 04 Sep 2010 10:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=8O0tgzYWZNXVLvrBxBCZ140OrcCvrvtxgRnoydzWmZU=; b=YrHM2mbNYTi4zqWC03uwn5dPZ5Okf2ccCvc2PnyQEyROFEwGY66CFF6fKLyY0c3b+j WBJkgZzqm1tVH/Q/fluSnJzqQAb2dtaDznIvc1/43oSySntnqd7v56SPQ4n313oLinQe NjjaSfoLAsLG65hBhUngUbjEpkA3uGA8f1YKw= 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; b=YIrZeuu+ZFlnobO65ybrpSTCv9TM56cxp+vhREkhDIoWoxmK/trzFH+RfcdOLCD0PL it5jMxBxKRdb7/adYYdIijCUTITTS62ifVvASHVRlhvH+gj6uaBBPbDEBU+UKAjHsyGC PyUgB7kFbnfgcMhAuVwYJmLfxwjHxkcAKi34g= MIME-Version: 1.0 Received: by 10.227.24.141 with SMTP id v13mr163089wbb.210.1283622256954; Sat, 04 Sep 2010 10:44:16 -0700 (PDT) Received: by 10.227.133.84 with HTTP; Sat, 4 Sep 2010 10:44:16 -0700 (PDT) In-Reply-To: References: Date: Sat, 4 Sep 2010 13:44:16 -0400 Message-ID: Subject: Re: [scxml] update datamodel from java From: Rahul Akolkar To: Commons Users List Content-Type: text/plain; charset=ISO-8859-1 On Sat, Sep 4, 2010 at 1:19 PM, Azraiyl wrote: > Thanks for your response. Just out of curiousity: Is this the intended > behaviour of SCXML? > > Chapter 3.3.3: If the "event" clause is missing, the transition is > taken whenever the "cond" evaluates to true. > At a high level, the only way for the environment to communicate with a state machine is through events. Data model changes are best made via native mechanisms described in state machine theory (such as event payloads). Doing so will cause the "cond" to be evaluated in the process and has the additional benefit of being more declarative (i.e. it will be modeled with the rest of the state machine, rather than behavior that can't be noticed just by reading the SCXML document). Programmatic access to the data model (only root context is accessible) is provided as this is often convenient in certain environments. However, such access clearly isn't portable across implementations and has the downsides of not being tied into the event processing loop. If such a choice is made by the developer, there is an additional onus on the developer -- this includes, firing an event if need be and synchronizing access if needed etc. IMO, the section 3.3.3 quote probably needs some sort of disclaimer for programmatic access. There are cases where the application may deem it unnecessary for every programmatic update to the root context to result in evaluating all conds. Commons SCXML provides the developer that level of control. -Rahul --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org