Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1982A99A9 for ; Sun, 17 Jun 2012 01:19:21 +0000 (UTC) Received: (qmail 19383 invoked by uid 500); 17 Jun 2012 01:19:20 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 19241 invoked by uid 500); 17 Jun 2012 01:19:19 -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 19233 invoked by uid 99); 17 Jun 2012 01:19:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Jun 2012 01:19:19 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rahul.akolkar@gmail.com designates 209.85.210.43 as permitted sender) Received: from [209.85.210.43] (HELO mail-pz0-f43.google.com) (209.85.210.43) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Jun 2012 01:19:13 +0000 Received: by dajz8 with SMTP id z8so6514909daj.30 for ; Sat, 16 Jun 2012 18:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=SOf9j6hYEzymY8D9XEBhW3FsljX17+SR/0PHNBsKg4Q=; b=1CqyvmmeJtA8qpVqpqllDEPE6H2DlQiloAFyCuzhPaakwiL9TzQtP+vlV7QimsWuAr zZT75uXIc687Rf3Am5FB/yeMdwUz2VmxaGIx6tjaWAUOshDXcIbK9zlR0ssWL+cb2i/P FXIvi25QbWR+rjYZ4HHwwf8wAvTDzym/IkkWHDfBk3NDFQ4DXku7xipu68OhnNLoSluf D2k2NSX5mfEOZ0A+qDkWNxUDrjC/EmhzfY8u1SFiq30CYC4vs/A4B2B0eRx2QBvMnpSU Bw1pDADjTGGcoIOI9bpRIcLpxLf/LGhPt0hVQ5mQcHFWMX4jGK0ySTDBhWPuXCixS/HV Zg6Q== MIME-Version: 1.0 Received: by 10.68.241.228 with SMTP id wl4mr34984679pbc.51.1339895933199; Sat, 16 Jun 2012 18:18:53 -0700 (PDT) Received: by 10.66.239.166 with HTTP; Sat, 16 Jun 2012 18:18:53 -0700 (PDT) In-Reply-To: References: Date: Sat, 16 Jun 2012 21:18:53 -0400 Message-ID: Subject: Re: [scxml] JEXL Evaluator's evalCond issue 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 Thu, Jun 14, 2012 at 5:23 PM, wrote: > 1. Problem renaming method in class used for condition evaluation. > > Class: Test > method: boolean method1(integer i) > > xml snippet: > > > =A0 =A0 =A0 =A0 =A0 =A0 cond=3D"test.method1(100)"/> > > > > We are trying rename test.method1(integer i) in Test class to > test.methodRenamed(integer i) > > and update xml to: > > > =A0 =A0 =A0 =A0 =A0 =A0 cond=3D"test.methodRenamed(100)"/> > > > Executing SCXML after the above change, test.methodRenamed(100) is not > invoked and no information in logs are seen nor any exception seen in the > trace. > > Note: Putting back to the old method name (test.method1(100)) works as > expected. > It isn't clear how you are testing the changes once you update the Test class. From the description, it doesn't look like the new Test class is loaded. I don't think this is related to Commons SCXML (i.e. the library code). > > 2. Problem adding a new method (test.methodNew(200)). > > Class: Test > methods: boolean method1(Integer i) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0boolean methodNew(Integer i) > > && test.methodNew(200)"/> > > > Executing SCXML: > > 1. test.method1(100) was invoked and returned true. > > 2. test.methodNew(200) was never invoked > > 3. JexlEvaluator's method "evalCond" line > exp.evaluate(getEffectiveContext(jexlCtx)) returns false. > > Note: Adding a non existent method or junk string to the xml's cond > attribute doesn't yield any failure information and JexlEvaluator simply > returns false . > Same comment as above. Additionally, boolean expressions are assumed to be false unless they successfully evaluate to true. > Versions used: commons-scxml-0.9.jar, commons-jexl.1.1.jar > > The issue seems to be a JEXL issue, however upgrading to the latest JEXL = 2 > version is not feasible due to compilation issues. > > Is there/will there be a version of SCXML that is compatible with a later > version of JEXCL? (ie: JEXL2) > You can try the Evaluator implementation attached here [1] (which is not released code) or provide your own evaluator implementation [2] for this. -Rahul [1] https://issues.apache.org/jira/browse/SCXML-114 [2] http://commons.apache.org/scxml/guide/contexts-evaluators.html > > Thanks & Regards > Satish Gutta > > > > Notice: This communication, including any attachments, is intended solely > for the use of the individual or entity to which it is addressed. This > communication may contain information that is protected from disclosure > under State and/or Federal law. Please notify the sender immediately if > you have received this communication in error and delete this email from > your system. If you are not the intended recipient, you are requested not > to disclose, copy, distribute or take any action in reliance on the > contents of this information. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org