Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 10171 invoked from network); 8 Jan 2009 18:49:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jan 2009 18:49:27 -0000 Received: (qmail 39904 invoked by uid 500); 8 Jan 2009 18:49:23 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 39843 invoked by uid 500); 8 Jan 2009 18:49:23 -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 39832 invoked by uid 99); 8 Jan 2009 18:49:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jan 2009 10:49:23 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,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; Thu, 08 Jan 2009 18:49:17 +0000 Received: from fwexhub4.itt.net (10.32.76.114) by edge.itt.com (10.32.16.12) with Microsoft SMTP Server (TLS) id 8.1.291.1; Thu, 8 Jan 2009 13:37:15 -0500 Received: from fwetgsmtp1.itt.net (10.32.77.200) by fwexhub4.itt.net (10.32.76.114) with Microsoft SMTP Server id 8.1.336.0; Thu, 8 Jan 2009 13:48:54 -0500 Received: from fwdefsmtp2.de.ittind.com ([10.32.77.203]) by fwetgsmtp1.itt.net with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Jan 2009 13:48:54 -0500 Received: from vnexch01.gilfillan.de.ittind.com ([10.33.168.20]) by fwdefsmtp2.de.ittind.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Jan 2009 13:48:54 -0500 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 Templating Date: Thu, 8 Jan 2009 10:48:52 -0800 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: SCXML Templating Thread-Index: AclxwNoXxNM7cBDFQVC1uCe53iNvKwAAIlIw References: From: "Lee, Cheryl - ES/RDR -Gil" To: Commons Users List X-OriginalArrivalTime: 08 Jan 2009 18:48:54.0292 (UTC) FILETIME=[C1543D40:01C971C1] X-Virus-Checked: Checked by ClamAV on apache.org OK, thanks a bunch for your help. I get it. Right now everything is local. I'll see what I can rig up to make this work locally or determine that I need some other approach like you've outlined using JSP. -----Original Message----- From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com]=20 Sent: Thursday, January 08, 2009 10:42 AM To: Commons Users List Subject: Re: SCXML Templating On Thu, Jan 8, 2009 at 8:37 AM, Lee, Cheryl - ES/RDR -Gil wrote: > Thanks for your response. > > I'm not familiar with using a JSP (assume are we talking Java Server > Pages?) in the context of my application. Mine is a stand-alone Java > GUI application using Swing with the state machine to respond to user > actions and other system actions. Is there a way to use a dynamic > resource without using JSP? If so, what would an example look like? > It doesn't have to be a JSP, it was used for illustration. All we're saying is use a dynamic URL to tweak the IDs as needed. If everything has to be local (no servlet container, web server or any type of remote service access), then it may not be straightforward to create such a dynamic URL (custom protocol handlers for the java.net.URL architecture or other fancy footwork perhaps). -Rahul > Thanks a bunch, > Cheryl > > -----Original Message----- > From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] > Sent: Wednesday, January 07, 2009 10:38 PM > To: Commons Users List > Subject: Re: SCXML Templating > > On Wed, Jan 7, 2009 at 4:45 PM, Lee, Cheryl - ES/RDR -Gil > wrote: >> Dear All, >> >> >> I have a situation where I need to execute the same set of sequential > sub-states from multiple places, and I would like to reuse an SCXML file > multiple times in the same "master" SCXML file (via the state "src" > attribute). I know there is a problem doing this because it would > result in duplicated state names. I have studied the tutorial in > http://wiki.apache.org/commons/SCXML/Tutorials/Templating, and the very > last paragraph under "A word of caution" I think contains the key to a > solution for me. It says that the duplicated names "can be avoided by > using a param=3Dvalue after the URL" as it mangles the URL. Does = anyone > have an example usage of this? >> > > > Not sure what the sentence in question on the wiki means either. > > However, lets replay the example, say we have this reusable template > (lets call it template.scxml): > > template.scxml: > > > > ... > > > > ... > > > > > where foo and bar do interesting things that we want to reuse in our > main.scxml. If we reference this static document multiple times like > so: > > main.scxml: > > > > ... > > > > ... > > > > > we'll get ID clashes (for IDs foo and bar, included twice). > > However, if we reference a dynamic resource (such as a JSP, lets call > this template.jsp) which allows us to tweak the IDs like the one > below: > > template.jsp: > <%@ page info=3D"SCXML template" %> > > > > ... > > > > ... > > > > > and then we reference the reusable pattern like so in our main.scxml: > > main.scxml: > > > > ... > > > > ... > > > > > we wouldn't get any ID clashes (since we now have states with ID foo1 > and bar1 as children of s1 and foo2 and bar2 as children of s2). > > -Rahul > > This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. 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 Corporation. The recipient should check this e-mail and any attachments for the presence of viruses. ITT accepts no liability for any damage caused by any virus transmitted by this e-mail. > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org