Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 95473 invoked from network); 5 Aug 2009 19:56:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Aug 2009 19:56:18 -0000 Received: (qmail 88763 invoked by uid 500); 5 Aug 2009 19:56:24 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 88654 invoked by uid 500); 5 Aug 2009 19:56:24 -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 88644 invoked by uid 99); 5 Aug 2009 19:56:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 19:56:24 +0000 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 209.85.221.199 as permitted sender) Received: from [209.85.221.199] (HELO mail-qy0-f199.google.com) (209.85.221.199) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 19:56:16 +0000 Received: by qyk37 with SMTP id 37so358719qyk.10 for ; Wed, 05 Aug 2009 12:55:55 -0700 (PDT) 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=vtSINYgvEYsUesKiAnIwJ+gFJr3CT2uaGWpa20tPNmc=; b=iVQ+37XrcnSlDTUZS4JUEkHkjaokZ5zdWv3wd/4pbCIzfSHwqs0Yjrj4BoI7dNWY9G MfEYvz3/qboG/JwS0Ru7qSlMGfyyngIpammIEK9ZKq3CktF2Z6vmd2z8xSRTimtS6MQX 9H5HtyMsWbuN8Bl5ax5A0KO2WJu2abXJZclNs= 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=KLPB1AA7qhgfCUlMV56gASMx6aR6qRgRTfJk7MiWElnjHFVgBjR6de3GowraBYa8RV 5WGjuAtSnUBxJ4n9nmzVYxZcBNz+8PB9ZONzg9XLpi6kdE/wyBzTJUUPQdeuhAAhvBCY uVJEw5sgO9riBAlzv5kPZoEutvufxpc6XfH7c= MIME-Version: 1.0 Received: by 10.224.89.19 with SMTP id c19mr7528375qam.379.1249502155495; Wed, 05 Aug 2009 12:55:55 -0700 (PDT) In-Reply-To: References: Date: Wed, 5 Aug 2009 15:55:55 -0400 Message-ID: Subject: Re: SCXML : can we use ${prop-name-attributes} within definition ? 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 Wed, Aug 5, 2009 at 3:50 PM, Renaud, Martin wr= ote: > Ok thanks. That make sense. I was just checking in case of... > > > I start prototyping with scxml, so I might bother you again in the next c= ouple days ;-) > Its no bother, please ask away ;-) -Rahul > -Martin > > > -----Original Message----- > From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] > Sent: Wednesday, August 05, 2009 3:41 PM > To: Commons Users List > Subject: Re: SCXML : can we use ${prop-name-attributes} within = definition ? > > On Wed, Aug 5, 2009 at 3:29 PM, Renaud, Martin = wrote: >> Hi Rahul, >> >> Thanks for answering. >> >> I want to avoid repeating the event name twice, because of the typo risk= s (among others). >> >> For example, once in the state machine definition: >> >> =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 >> =A0 =A0 =A0 =A0 >> >> And again in the code: >> >> =A0 =A0 =A0 =A0public static String EVENT_NAME =3D "core.request.send"; >> =A0 =A0 =A0 =A0... >> =A0 =A0 =A0 =A0mySM.fireEvent(EVENT_NAME) >> >> >> The names are different (send/sent). >> > > > OK, got it. > > >> I could easily inject the names in my java code using spring and a prope= rty file. EX: >> >> event.name.foo=3Dcore.request.sent >> >> and use the property name ${event.name.foo} where I need in spring files= and use some bean to trigger the events. I would like to know if there is = a similar substitution mechanism that allows me to use to a property file (= the same in this case) against my state machine definition. >> >> I understand that I can pre-process the xml document before handing it t= o scxml, but I wanted to know if this feature exists or is being plan. >> > > > You will have to do some pre-processing since this kind of > substitution is not provided as a feature by Commons SCXML. One could > imagine a number of technologies (generate a DTD or DOCTYPE with > entities, straight text replacement etc.) that will allow setting up > of such pre-processing, so in that sense it almost seems beyond the > scope of the core library function. > > -Rahul > > >> Thanks, >> >> Martin >> >> >> -----Original Message----- >> From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] >> Sent: Wednesday, August 05, 2009 3:05 PM >> To: Commons Users List >> Subject: Re: SCXML : can we use ${prop-name-attributes} within = definition ? >> >> On Wed, Aug 5, 2009 at 8:37 AM, Renaud, Martin= wrote: >>> Hi, >>> >>> I would like to know if it's possible, using a built-in feature of >>> apache commons scxml, to use property place holder in the xml file that >>> defines the state machine ? The reason is to avoid duplication of event >>> names in the sm definition and in the java code ? >>> >> >> >> Not sure which duplication is being refered to, please elaborate. >> >> >>> >>> >>> Basically, I would like to do something like this and have a property >>> file defining eventA and eventB. >>> >> >> >> Pre-processing of any sort can be done to the SCXML document before >> being handed to the library ofcourse. It seems something like XML >> entities may help you here (but I'll need help understanding the >> question first). >> >> -Rahul >> >> >>> >>> >>> >> =A0 =A0 =A0 version=3D"1.0" >>> =A0 =A0 =A0 initialstate=3D"reset"> >>> >>> =A0 =A0 >>> =A0 =A0 =A0 =A0 >>> =A0 =A0 >>> >>> =A0 =A0 >>> =A0 =A0 =A0 =A0 >>> =A0 =A0 >>> >>> >>> >>> Thanks, >>> >>> Martin >>> >>> --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org