From imperius-dev-return-64-apmail-incubator-imperius-dev-archive=incubator.apache.org@incubator.apache.org Wed Jan 09 16:42:51 2008 Return-Path: Delivered-To: apmail-incubator-imperius-dev-archive@locus.apache.org Received: (qmail 83849 invoked from network); 9 Jan 2008 16:42:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2008 16:42:51 -0000 Received: (qmail 2863 invoked by uid 500); 9 Jan 2008 16:42:37 -0000 Delivered-To: apmail-incubator-imperius-dev-archive@incubator.apache.org Received: (qmail 2847 invoked by uid 500); 9 Jan 2008 16:42:37 -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 2736 invoked by uid 99); 9 Jan 2008 16:42:37 -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 08:42:36 -0800 X-ASF-Spam-Status: No, hits=-2.0 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jneeraj@us.ibm.com designates 32.97.110.154 as permitted sender) Received: from [32.97.110.154] (HELO e36.co.us.ibm.com) (32.97.110.154) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jan 2008 16:42:22 +0000 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e36.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m09GgEZJ010936 for ; Wed, 9 Jan 2008 11:42:14 -0500 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m09Gg2ge147008 for ; Wed, 9 Jan 2008 09:42:02 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m09Gg2QA025929 for ; Wed, 9 Jan 2008 09:42:02 -0700 Received: from d03nm118.boulder.ibm.com (d03nm118.boulder.ibm.com [9.17.195.144]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id m09Gg1aF025920 for ; Wed, 9 Jan 2008 09:42:01 -0700 In-Reply-To: <1199894233.4784eed9b3e7f@webmail.jpox.org> To: imperius-dev@incubator.apache.org MIME-Version: 1.0 Subject: Re: Usage of InstanceInfo in Decision blocks does not work X-Mailer: Lotus Notes Release 7.0 HF277 June 21, 2006 From: Neeraj Joshi Message-ID: Date: Wed, 9 Jan 2008 11:42:00 -0500 X-MIMETrack: Serialize by Router on D03NM118/03/M/IBM(Release 8.0|August 02, 2007) at 01/09/2008 09:42:01, Serialize complete at 01/09/2008 09:42:01 Content-Type: multipart/alternative; boundary="=_alternative 005BBC49852573CB_=" X-Virus-Checked: Checked by ClamAV on apache.org --=_alternative 005BBC49852573CB_= Content-Type: text/plain; charset="US-ASCII" Hi Erik, You are right about the imported variables not being considered by the primary expression. Looking forward to your patch Thanks Neeraj ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Those are my principles. If you don't like them I have others." http://incubator.apache.org/imperius Neeraj Joshi Autonomic Computing Policy Development Tivoli, IBM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Erik Bengtson 01/09/2008 10:57 AM Please respond to imperius-dev@incubator.apache.org To imperius-dev@incubator.apache.org cc Subject Usage of InstanceInfo in Decision blocks does not work 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 --=_alternative 005BBC49852573CB_=--