Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 8460 invoked from network); 28 Dec 2007 19:33:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Dec 2007 19:33:14 -0000 Received: (qmail 18892 invoked by uid 500); 28 Dec 2007 19:32:58 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 18834 invoked by uid 500); 28 Dec 2007 19:32:58 -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 18825 invoked by uid 99); 28 Dec 2007 19:32:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Dec 2007 11:32:58 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lupu.slobodu@gmail.com designates 72.14.246.242 as permitted sender) Received: from [72.14.246.242] (HELO ag-out-0708.google.com) (72.14.246.242) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Dec 2007 19:32:36 +0000 Received: by ag-out-0708.google.com with SMTP id 23so187493agd.10 for ; Fri, 28 Dec 2007 11:32:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=JO7XFWarwg8zZ7tipBABY5bB+bw0qPSha1x/OSmuYxs=; b=MgQWotcVxZWNHku6aAsjclelU/VsIaTuvAp1SG4yFSt4Rpxym67PpUbIbdy1t9Vh2PWxm4DaomtNQe8mDTxk7PQFasXGpsVHAd/ditlahEEFVyPsyp9GJaf//qx+l0qJzPu21wPSSrDG1zgfTZtMlxSe+gUMSWCxFEPKQWqbZ/U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=HM8WioZ8ZuLG2xPPWe7o3rVlB5D6vN7a8g5iuuVxErzOFacJ1h+NF389nPurE/NyX0EA3b5qQu2oTKK1RqaPX34sKfcX7liPioWmv+ngvojXOUnNvXiCN2x9PVeLh9DOJT9JryrM4zOxVjFKaJG4RKo2vmtJVNt1v9PqLeonNvk= Received: by 10.150.204.19 with SMTP id b19mr2714144ybg.63.1198870360201; Fri, 28 Dec 2007 11:32:40 -0800 (PST) Received: by 10.150.157.8 with HTTP; Fri, 28 Dec 2007 11:32:40 -0800 (PST) Message-ID: <2f0968250712281132q186ceacerfcaca1623f874ba9@mail.gmail.com> Date: Fri, 28 Dec 2007 14:32:40 -0500 From: "Lupu Slobodu" To: "Jakarta Commons Users List" Subject: Re: SCXML In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10037_1534051.1198870360158" References: <2f0968250712281055i7f22204cy76101ec3534395e5@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_10037_1534051.1198870360158 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline sure, so the information is available just at runtime, no way to determine it before calling engine.go(), right? On Dec 28, 2007 2:12 PM, Rahul Akolkar wrote: > On 12/28/07, Lupu Slobodu wrote: > > Is there a chance to know at the parsing time what state is a (custom) > > action going to run in? This could be useful if one wants to initialize > and > > validate an action handler registry that would associate action handlers > to > > particular states. > > > > > Without going to the architectural necessity for such introspection > (it may be good to do without it, if possible), the state in which a > custom action is being executed at run-time is the parent of the > Executable container in which it resides i.e. given ... > > > > > > > > where is implemented by a custom action whose execute() > method contains (untested): > > String id = getParent().getParent().getId(); > > then the value of id for the execution above would be "foo". > > -Rahul > > > > While it is possible to determine the current sate at run time and > > dynamically instantiate the handlers( as the AbstractStateMachine does), > > this approach leaves room for potential inconsistencies (as a handler > class > > could not be defined) > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > ------=_Part_10037_1534051.1198870360158--