Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 46168 invoked from network); 11 Jul 2006 00:45:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Jul 2006 00:45:20 -0000 Received: (qmail 8212 invoked by uid 500); 11 Jul 2006 00:45:14 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 8066 invoked by uid 500); 11 Jul 2006 00:45:14 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 8054 invoked by uid 99); 11 Jul 2006 00:45:13 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jul 2006 17:45:13 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.228.53] (HELO web50912.mail.yahoo.com) (68.142.228.53) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 10 Jul 2006 17:45:12 -0700 Received: (qmail 13495 invoked by uid 60001); 11 Jul 2006 00:44:51 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=OiCJYITERxO4O77NDdMuPaS7IBNngAkqRjdcHTpb68npPH92Sk574DEYVGOU2kY1W3uhdRFtcQc6UT65hAieIF/mElXoFWj2RjhHCwsx3UscxRGzrfXJNyAXVwf5t1Y9x0x2WY1P4bILZj7+VgQg5847fVil57D4jarT5ii00co= ; Message-ID: <20060711004451.13493.qmail@web50912.mail.yahoo.com> Received: from [72.148.142.191] by web50912.mail.yahoo.com via HTTP; Mon, 10 Jul 2006 17:44:50 PDT Date: Mon, 10 Jul 2006 17:44:50 -0700 (PDT) From: Nestor Urquiza Subject: Re: [scxml] TriggerEvent.ERROR_EVENT type behavior To: Jakarta Commons Users List In-Reply-To: <20060709134202.96991.qmail@web50903.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Going further thru the code and looking to some tips from Rahul [1] I still am wondering if the only alternative must be to author custom actions extending the Commons SCXML Action abstract base class. In my specific case I cannot do so since I am relying in a lot of helper method I access from objects that I have in the Root Context and for me it is impossible to change all those objects. Consider for example: userProfile is an instance of UserProfile class which cannot implement the Action abstract class. Still I need any error in UserProfile#isContentSupported() to be able to call something like processError() that in turn can just suspend the execution of the state machine by means of calling exactly as suggested in [1] : I followed the code and it is not clear how I can accomplish this ... Maybe instead of SCXMLExecutor#triggerEvents we could add something like SCXMLExecutor#triggerException passing the name of the internal event to be passed (err.fo) and ensuring that that event can be the next step to be done ignoring any other "standard" or "custom" action? I have been calling my var assignments with the result of my helper methods "custom actions" while I understand they are not really "custom actions" from scxml definitions so I rather use thye term once suggested by Rahul I think "specific actions" Any feedback here?, Thanks [1] http://marc.theaimsgroup.com/?l=jakarta-commons-user&m=114780510526564&w=2 --- Nestor Urquiza wrote: > Hello guys, > I guess because of my own mistake at some point I > used: > evts[0] = new TriggerEvent("app.error", > TriggerEvent.ERROR_EVENT, null); > to manage an error assumming that being the type = > "ERROR" and having defined in my scxml: > > the engine would go directly to IDDLE state and no > other code would be executed from the scxml file. > > Going thru the code I see that this is wrong > assumption since at least the last version of > SCXMLExecutor#triggerEvents() restores the rest of > the > events data (restoreEventData(oldData);) and so the > scxml continues executing the uneeded code. > > My question is ... is this a feature could/should be > implemented? This is, when firing an error > transition > just ignore the rest of the actions to be executed > and > just execute the error event specified by > TriggerEvent() constructor. If this is not an > expected > behavior from the SCXML specification I guess I can > have the same behavior if I am able to call > SCXMLExecutor#setEventData() to just clear the > pending > events, however this method is private. > > Thanks as always for any help, > Nestor > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam > protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: > commons-user-help@jakarta.apache.org > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org