From imperius-dev-return-63-apmail-incubator-imperius-dev-archive=incubator.apache.org@incubator.apache.org Wed Jan 09 15:57:51 2008 Return-Path: Delivered-To: apmail-incubator-imperius-dev-archive@locus.apache.org Received: (qmail 66064 invoked from network); 9 Jan 2008 15:57:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2008 15:57:51 -0000 Received: (qmail 3343 invoked by uid 500); 9 Jan 2008 15:57:40 -0000 Delivered-To: apmail-incubator-imperius-dev-archive@incubator.apache.org Received: (qmail 3332 invoked by uid 500); 9 Jan 2008 15:57:40 -0000 Mailing-List: contact imperius-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: imperius-dev@incubator.apache.org Delivered-To: mailing list imperius-dev@incubator.apache.org Received: (qmail 3323 invoked by uid 99); 9 Jan 2008 15:57:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jan 2008 07:57:40 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.148.213.132] (HELO smtp.mailix.net) (216.148.213.132) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jan 2008 15:57:28 +0000 Received: from [192.168.8.8] (helo=localhost) by smtp.mailix.net with asmtp (Exim 4.24-CA) id 1JCdIn-0002EN-P3 for imperius-dev@incubator.apache.org; Wed, 09 Jan 2008 07:57:13 -0800 Received: from 212.224.148.35 ([212.224.148.35]) by webmail.jpox.org (IMP) with HTTP for ; Wed, 9 Jan 2008 07:57:13 -0800 Message-ID: <1199894233.4784eed9b3e7f@webmail.jpox.org> Date: Wed, 9 Jan 2008 07:57:13 -0800 From: Erik Bengtson To: imperius-dev@incubator.apache.org MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) 3.2.3 X-Originating-IP: 212.224.148.35 X-SA-Exim-Mail-From: erik@jpox.org Subject: Usage of InstanceInfo in Decision blocks does not work Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-SA-Exim-Version: 3.1 (built Thu Oct 23 13:26:47 PDT 2003) X-SA-Exim-Scanned: No; Unknown failure X-uvscan-result: clean (1JCdIn-0002EN-P3) X-Virus-Checked: Checked by ClamAV on apache.org I have this code: Import Class org.eclipse.hyades.logging.events.cbe.CommonBaseEvent:event; ... Policy { ... Decision { RaiseAlarm(event,"alarmname",...) } When the Policy is evaluated, the RaiseAlarm action is created with a [null,"alarmname",...]. An initial analysis demonstrates that Import variables (event) are not considered by the PrimaryExpression, so it throws an SPLException and when the compilation/evaluation of the Decision Block occurs, the expression is actually null. To change this situation, I've changed the PrimaryExpression.validate and PrimaryExpression.evaluate methods. In the changed PrimaryExpression validate and evaluate method, I first check for an existing symbol, via symbolExists and if it does, work with it, otherwise try getInstance, and if none of these exists throw symbol does not exist Please comment, and I provide a patch if desired