Re: [rules-users] Drools causes switch(enum e) to break?
by SydneyTechHead
I've reproduced this issue with a simple example:
1. Create a new "Drools Project" in Eclipse Kepler with Drools 6.0.1.Final
installed (JDK 1.7) with simple "Hello World" rule example. Project builds
OK.
2. Create the following new class:
public class EnumTest {
private enum EnumType { On, Off }
private EnumType et = EnumType.On;
public EnumTest() {}
public String TypeText()
{
switch(et)
{
case On:
return "On";
case Off:
return "Off";
default:
return "";
}
}
}
3. Rebuild project. Eclipse reports Problem:
Drools Error: "Cannot switch on a value of type EnumTest.EnumType. Only
convertible int values or enum variables are permitted"
4. Export Ant Build file for the project and run the Ant Build. Build
successful.
5. Create a vanilla Java Project (no Drools) and add the same EnumTest
class. Eclipse project builds OK.
As the project builds OK via Ant, it appears that this is an issue with the
Eclipse incremental builder conflicting with Drools 6. As noted in my
previous post, it appears that Eclipse may be reducing JDK compiler
compliance level down to 1.5 or referencing JRE 1.5 in class path as a
result of this conflict, as I've occasionally noticed it changing these
settings in project properties.
Any ideas or clues why this may be the case and what is the best channel to
report this Eclipse issue?
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-causes-switch-enum-e-to-break-tp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 5 months
Drools 6 BRMS workflow
by djb
Hey all,
I'm having trouble with the BRMS/workbench. Making an existing project
accessible via the guided rule editor is more difficult than I imagined. I
am getting nowhere.
Currently my rules are all in DRL files in my domain model, and my project
structure is:
EAR / WEB-APP / DOMAIN MODEL / ENTITY SERVICE / ENTITY FACADE / ENTITY MODEL
So I need the classes in the domain model, entity facade and entity model
available to the BRMS. They are available from SVN, or Maven, or as jars.
So I import these jars as Artifacts... and add them as dependencies using
'Add from Repository'
now I want to use the BRMS to allow users to edit rules.
How do I go about doing this? I presume I need to set it up in the data
modeller, but my classes and packages don't show up in the drop down... ?
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-BRMS-workflow-tp4030735.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 6 months
Existing KieBase is not updating when update rules using KieScanner.
by vinay.p
*History :*
Previously we were using Drool 5.6.0.Final version and for dynamic rule
updation we configured KnowledgeAgent with changeset xml. This was working
like a charm, whenever we update our rules [.drl file] already existing
knowledgebase also gets updated.
*Issue:*
Now we updated to Drool 6.1.0.Final version and using KieScanner for dynamic
updation of rules [rules deployed as kjar]
When we deployed kjar with latest rules, In logs we see that KieScanner
picking newly deployed kjar.
*INFO KieRepositoryImpl - KieModule was added:ZipKieModule[
ReleaseId=com.abc:kJar:4.0file=C:\Users\xxxx\.m2\repository\com\abc\kJar\4.0\kJar-4.0.jar]
INFO KieScanner - The following artifacts have been updated:
{com.abc:kJar:3.0=com.abc:kJar:jar:4.0}*
*But my already exiting KieBase is not updated even after this.*
If I create new KieBase it picking new changes, is there any configuration I
missing for updating my exiting kiebase??
--
View this message in context: http://drools.46999.n3.nabble.com/Existing-KieBase-is-not-updating-when-u...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 6 months