incubator-imperius-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neeraj Joshi <jnee...@us.ibm.com>
Subject Re: Usage of InstanceInfo in Decision blocks does not work
Date Wed, 09 Jan 2008 16:42:00 GMT
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 <erik@jpox.org> 
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



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message