RuleFlow Action Nodes
by keithnielsen
I am trying to use action nodes with a ruleflow with a dialect of java. Here
is the text from the node:
dialog = new CIDDialog(accountSummaryViewShell,0);
dialog.getOverrideButton().setEnabled(true);
dialog.open();
I get an error during compilation that states:
com/dfs/dc/servicing/cms/cid/verification/Process_com_dfs_dc_servicing_cms_cid_verification_0.java
(38:1890) : dialog cannot be resolved
which is not expected if its to be valid java since I don't declare a type
for dialog
I then tried to specify a type as follows:
CIDDialog dialog = new CIDDialog(accountSummaryViewShell,0);
dialog.getOverrideButton().setEnabled(true);
dialog.open();
which results in an error when I try and build the project:
Process 'CIDVerificationFlow' [CIDVerificationFlow]: Action node
'Display_CID_Verification_Override_Enabled' [21] has invalid action: unknown
class or illegal statement: Unknown Drools Error
Any suggestions?
Thanks
--
View this message in context: http://www.nabble.com/RuleFlow-Action-Nodes-tp20876073p20876073.html
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 11 months
Embedding Drools in Eclipse
by keithnielsen
Since my last post was so nicely hijacked I have started a new thread in the
hopes that the Drools team can shed some light on this.
My setup is as follows:
1) 2 plug-ins, one containing the drools libraries, and a second plugin
containing the facts and the rule file.
2) The rules engine plugin has a buddy-policy of "registered" and the facts
plugin has the rules engine plugin as a registered buddy.
Here is the rule(although any fact that has field assignments fails)
rule "Retrieve CID Presentation Model"
ruleflow-group "RetrieveCID"
when
CIDPresentationModel($cidValue:cidValue,$cidExpirationDate:expirationDate)
then
boolean cidResult =
cidService.verifyCIDIsValid($cidValue,$cidExpirationDate);
CIDResult result = new CIDResult(cidResult);
insert(result);
System.out.println("Executing: Retrieve CID Presentation
Model");
end
Deep in the bowels of drools there is a call to
ClassFieldAccessorFactory.getClassFieldReader where it attempts to create a
class using the byte array classloader, i.e. final Class<?> newClass =
byteArrayClassLoader.defineClass(className, bytes,PROTECTION_DOMAIN). Its at
this point that a NoClassDefFoundError on the BaseObjectClassFieldReader. I
am a little concerned when I see what appears to be a custom classloader
since if you are going to embed the rules engine it should respect the
classloader hierachy from the container, whether that be an app server like
Websphere or client side container like Eclipse.
I am wondering if the team has had success with this particular setup (the
examples for Drools work cause they are all in the same plugin). I have made
the example as simple as possible but still no luck. Seems like this is
pretty basic functionality so I can't imagine this hasn't been tested.
--
View this message in context: http://www.nabble.com/Embedding-Drools-in-Eclipse-tp20814423p20814423.html
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 11 months
decision tables - no agenda group?
by Evans, Jess
It doesn't appear that the decision table parser supports an
agenda-group declaration. I find this odd since the documentation says
it supports activation and ruleflow. Can someone validate this?
thanks,
-Jess
15 years, 11 months
Inline eval problem!
by vanshi
I need to convert a variable from string to intger in the rule. That variable
here is rank, so, I create a helper class called 'Conversion' with just one
function/method, which is supposed to convert the string argument passed to
it, to an integer and then I call that method in rule as inline eval. What's
wrong here because this is not working and I don't want to change 'When'
part too much because it has 10 or so other variable with && connective,
which I've removed for clarity here. Any input would be appreciated much.
package harules;
import com.hibernate.Person;
import com.uhg.utils.Conversion;
rule "one"
salience 10
when
$con: Conversion();
pers: Person(age!= null , age >= 18 , eval($con.getInteger(rank) > 140))
then
System.out.println("Evaluated true");
end
//content of Conversion class
package com.utils;
public class Conversion {
public Integer getInteger(String s)
{
return Integer.parseInt(s);
}
}
--
View this message in context: http://www.nabble.com/Inline-eval-problem%21-tp20786253p20786253.html
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 11 months
NoClassDefFoundError: BaseObjectClassFieldReader
by keithnielsen
I have the following rule:
rule "Retrieve CID Presentation Model"
ruleflow-group "RetrieveCID"
when
CIDPresentationModel($cidValue:cidValue,$cidExpirationDate:expirationDate)
then
boolean cidResult =
cidService.verifyCIDIsValid($cidValue,$cidExpirationDate);
CIDResult result = new CIDResult(cidResult);
insert(result);
System.out.println("Executing: Retrieve CID Presentation Model");
end
Deep in the bowels of drools there is a call to
ClassFieldAccessorFactory.getClassFieldReader where it attempts to create a
class using the byte array classloader, i.e. final Class<?> newClass =
byteArrayClassLoader.defineClass(className, bytes,PROTECTION_DOMAIN). Its at
this point that a NoClassDefFoundError on the BaseObjectClassFieldReader.
>From what I understand of NoClassDefFoundError it can result when there are
two sources of the same class in the classpath or if there is some reference
from the class resulting in the error to another class that can not be
resolved. It only appears in situations where there is fields involved. It
doesnt seem to matter how simple the object is, the minute I try to use
field assignment it throws an error.
The rules engine is running as an Eclipse plug-in.
--
View this message in context: http://www.nabble.com/NoClassDefFoundError%3A-BaseObjectClassFieldReader-...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 11 months
drools-compiler for JBoss
by pramod george
Dear all,
I initially did my project in WebLogic using the following jars:
*drools-compiler-4.0.7.jar
*drools-core-4.0.7.jar
*drools-decisiontables-4.0.7.jar
*drools-repository-4.0.7.jar
However, now I need to port all of these to a JBoss server. On doing so, I got some exceptions on "Eclipse" ??? Knowing more I realised that this is some compiler conflict. The sites I hit upon are-
http://www.mail-archive.com/rules-users@lists.jboss.org/msg00375.html
http://www.jboss.org/community/docs/DOC-11925
What is JBoss-rules and how different is it from a the compiler that I'm using listed above? Are there any 'other' jars to be used specifically for JBoss??
Thanks a lot.
-Promod George
15 years, 12 months
Drools govnor and event roles
by Zoltan Farkas
I was looking at the new guvnor UI and I am particularly interested in the new CEP features
Is it possible to declare the following with the GUVNOR ui?:
declare StockTick
@role( event )
@timestamp( timestampAttr )
companySymbol : String
stockPrice : double
timestampAttr : long
end
I don't see how I could declare the @role and @timestamp with the UI.
is there a workaround?
thanks
--zoly
15 years, 12 months