Localization in DSL
by Shigeaki Wakizaka
Hello.
I'd like to use Japanese in DSL.
Is it possible?
Do you have a plan to do the localize-thing with DSL and
brand-new BRMS?
Thanks in advance
Shige
17 years
ClassCastException with 5.0CR1 on execute(Iterable obj)
by psentosa
Hi all,
I've just updated to drools 5.0CR1.
Before I had this kind of expression:
ksession.executeIterable(objects) with objects ist a list containing
different kind of objects
and this worked perfectly.
after updating, I use the forementioned execute(Iterable obj) on the same
list of objects, but I got the class cast exception:
12:13:18,718 INFO [STDOUT] [] [2009:03:72 12:03:718:info] KnowledgeAgent
new KnowledgeBase now built and in use
12:13:19,156 ERROR [myClass.Interceptor] []
org.drools.base.mvel.MVELEvalExpression@14e4952 :
java.lang.ClassCastException: java.lang.Integer
org.drools.RuntimeDroolsException:
org.drools.base.mvel.MVELEvalExpression@14e4952 :
java.lang.ClassCastException: java.lang.Integer
at org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:122)
at
org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:180)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:117)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:34)
at
org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:189)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:117)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:28)
at org.drools.reteoo.FromNode.evaluateAndPropagate(FromNode.java:156)
Could this be a problem from mvel or is it eventually my code that causes
this? (no changed on my code has been made before)
many thanks for hints
Regards
--
View this message in context: http://www.nabble.com/ClassCastException-with-5.0CR1-on-execute%28Iterabl...
Sent from the drools - user mailing list archive at Nabble.com.
17 years
Identify Rule on Attributes
by Nikhil_dev
Hi All,
i have set of Rules that is complied and stored in the memory.
Now can any one tell me, is it possible to identify which Rule to execute
out of those set of complied rules using the attributes that i have.
I would like to know is there any method available in drools to solve the
issue since rules once executed they are always available.
-----
Regards,
:working:Nikhil
--
View this message in context: http://www.nabble.com/Identify-Rule-on-Attributes-tp22471473p22471473.html
Sent from the drools - user mailing list archive at Nabble.com.
17 years
Drools Boot Camp possibly in San Francisco for June
by Mark Proctor
As I'm going to be at JavaOne <http://java.sun.com/javaone/> we are
thinking about combing this years boot camp at the same time, if we can
get budget approval. We don't yet have a hotel booked or meeting room
available, so if you can recommend a cheap but good hotel with
conference facilities for approx 15-20 people, or better still can
donate meeting room facilities then please let me know.
Thanks
Mark
17 years
AssertBehaviour.IDENTITY on Drools5.0
by Shigeaki Wakizaka
Hi.
I'm just wondering how I can change an assertBehaviour with Drools5.0.
Documentation is the same as 4.0 as follows:
RuleBaseConfiguration conf = new RuleBaseConfiguration();
conf.setAssertBehaviour( AssertBehaviour.IDENTITY );
conf.setRemoveIdentities( true );
RuleBase ruleBase = RuleBaseFactory.newRuleBase( conf );
I may be missing something.
Please tell me how, thanks.
waki
17 years
Drools 4.0.7 Or 5.0.X ?
by surya_n2007
Hi All,
We want to implement drools as our rule engine , planning to use drools
4.0.7 since i am thinking drools 5.0 has bugs and fixes is going on .
Our application has huge volume of facts performance is main
criteria,planning to use RuleFlow and it is standalone application not using
BRMS this is one reason to select 4.0.7 . Our project is going into
production after 1 year so please let me know is it good idea to implement
4.0.7 or 5.0.X ?
Thanks & Regards
Surya.
--
View this message in context: http://www.nabble.com/Drools-4.0.7-Or-5.0.X---tp22476826p22476826.html
Sent from the drools - user mailing list archive at Nabble.com.
17 years
Problem add DSL,add more than one file to Ruleagent
by surya_n2007
Hi ,
I am having problem to add DSL to rule agent . How to add DSL , I can add
dsl using PackageBuilder.addPackageFromDrl("x.drl","y.dsl") cant take this
approach since,
we are using standalone application not using BRMS want to update new rules
so i am using RuleAgent and passing properties.
But unable to add Dsl to the ruleagent and another problem unable to add
more than one drl files.
Please provide some example else some ideas are helpful.
Code :
Properties dynamicRueProperties = new Properties();
dynamicRueProperties.setProperty("name", "SampleRuleAgent");
dynamicRueProperties.setProperty("dir",
"C:/Project/Workspace/DroolsTest/rules");
dynamicRueProperties.setProperty("file",
C:/Project/Workspace/DroolsTest/rules/file.drl");
dynamicRueProperties.setProperty("localCacheDir",
"C:/Project/Workspace/DroolsTest/dump");
dynamicRueProperties.setProperty("poll", "30");
dynamicRueProperties.setProperty("newInstance", "false");
RuleBase ruleBase = null;
RuleAgent ruleAgent = null;
ruleAgent = RuleAgent.newRuleAgent(ruleProperties);
Thanks & Regards
Surya.
--
View this message in context: http://www.nabble.com/Problem-add-DSL%2Cadd-more-than-one-file-to-Ruleage...
Sent from the drools - user mailing list archive at Nabble.com.
17 years
RuleAgent question
by J Michael Dean
Two questions. I am interested in using RuleAgent but with the file
or dir property rather than the URL. However, it is not clear to me
where the directories or files must actually be located. If I use
dir=/
then the DirectoryScanner is invoked and claims to have found some
number of files, but I have no idea WHERE it is scanning. If I add
anything like dir=/foo then I get an invalid directory exception.
If I try file=/foo.pkg then I get exception that this is invalid file.
Question 1 - is there an example somewhere that can help me understand
where I am going off the track? I am working Eclipse environment.
Question 2 - if using the BRMS and URL, can there be a backup dir,
file, or cache option that is in the classpath rather than a specific
directory? I would like to distribute an Eclipse application that has
a rule package deployed, but that overrides this with the URL if
available.
Thanks.
- Mike
17 years
Problem in defining DSL in Guvnor (and some possible bugs?)
by psentosa
Hi all,
I'd like to define some DSL sentences using Guvnor. Then using the
DSL-Editor from eclipse, I create the following mappings (for consequence):
1.
[CONSEQUENCE]Following "{time}" regulation "{regname}" is violated=String
day = "{time}"; String regulation = "{regname}"; ViolatedRegulation vr = new
ViolatedRegulation(emp, regulation, act, day);
violatedRegulationObject.add(vr);
Now..the problem I had:
If I try to crete rule using guided editor, in consequence, the created
string based on the input contains many white spaces
then
String day = " DAY "; String regulation = " day.max.working1 ";
if I use DSL business editor, the generated source code is ok.
2.
Actually the CONSEQUENCE part generated by eclipse DSL editor is not exactly
what I pasted above; Instead it was CONSEQUENCE[] (the square brackte was
empty and "CONSEQUENCE" is outside the bracket. But when I edited this using
text editor, and open the .dsl file using the DSL editor again, it shows
nothing, although the sentences still can be shown using text editor.
3. I had problem finding my DSL sentences (by pressing Ctrl+space) using
both guided editor and DSL editor in Guvnor at the beginning, because i had
the prefix condition/consequence/when/then all in small letters (sometimes
they are shown but sometimes not). As soon as I wrote them in capital, I can
find them without problem. Is the capital letter really a requirement?
Many thanks in advance for hints
Regards
--
View this message in context: http://www.nabble.com/Problem-in-defining-DSL-in-Guvnor-%28and-some-possi...
Sent from the drools - user mailing list archive at Nabble.com.
17 years
Ruleflow nog showing
by Femke De Backere
Hi!
As I was creating a new ruleflow, to fit as a subprocess in another
ruleflow, I encountered the following problem: My ruleflow is build,
and I checked the correctness with the "Check the ruleflow model"
button. When I close Eclipse and reopen my project again, my whole
ruleflow (except for the start node) is gone, the xml behind the .rf
still exists, but the view is gone. Has anyone any clue what happened?
Thx,
Femke
17 years