questions about conflict resolution
by Frank Wilson
Hi all,
I can't seem to get a clear answer from the manual. In understand that if rules are at the same priority their execution order (the conflict resolution) will be arbitrary. What I am not sure of is if the order is the same for every run on all machines. Could somebody clarify this for me?
Thanks,
Frank
12 years, 4 months
Re: [rules-users] modifying the problem facts while running the solver - Drools Planner
by ge0ffrey
spinjala wrote
>
> I am new to Drools planner. I have one issue and wanted to understand how
> to resolve it best.
>
> I am trying to use planner to optimize the scheduling of work orders to
> resources. I have certain resources that need to be assigned to a work
> order in a way that maximizes the utilization of the resource. But I have
> a condition where once a resource is scheduled for a workorder, he/she
> shouldn't be scheduled for any other work order again during the same day.
> How do we manage this condition? do we add it as a constraint in the
> drools rule file so that scoring can handle it or do we write a custom
> solver phase to check if a solution has this resource assigned to a WO,
> then skip the resource and proceed with further solution. Please help.
>
See nurseRosteringScoreRules.drl:
// a nurse can only work one shift per day, i.e. no two shift can be
assigned to the same nurse on a day.
rule "oneShiftPerDay"
when
$leftAssignment : ShiftAssignment($leftId : id, $employee :
employee, $shiftDate : shiftDate)
$rightAssignment : ShiftAssignment(employee == $employee, shiftDate
== $shiftDate, id > $leftId)
then
insertLogical(new IntConstraintOccurrence("oneShiftPerDay",
ConstraintType.NEGATIVE_HARD,
1,
$leftAssignment, $rightAssignment));
end
--
View this message in context: http://drools.46999.n3.nabble.com/modifying-the-problem-facts-while-runni...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Connecting to repository using JMS
by Anton Hughes
Hi
I would like to connect to guvnor / repository using jms.
I am currently also using camel.
Is there any documentation, samples, articles on this?
Thanks and regards,
Anton
12 years, 4 months
guvnor 5.4 final turning off authentication
by mpgong
Hello,
I'm trying to upgrade from 5.3 to 5.4 and i guess i must have configured 5.3
to not authenticate when accessing the resources in guvnor like the
binaries, etc using the REST api because when i try to access them under 5.4
i'm getting the 401 response.
I read that security is configured in the beans.xml i believe but not sure
how to do it properly. I basically want to have no authentication. In 5.3
i believe this was achieved changing the components.xml and adding this
<security:identity authenticate-method="#{nilAuthenticator.authenticate}"/>.
How do i this under 5.4?
Thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/guvnor-5-4-final-turning-off-authentica...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Web decision tables (Guvnor)
by Stephen Masters
Hi folks,
Given a decision table a bit like this (hopefully the monospaced font lays it out ok!):
Account Currency CanTrade
1 EUR Y
1 USD Y
1 IDR Y
1 Otherwise N
2 EUR Y
2 USD Y
2 Otherwise N
LHS conditions are generated a bit like this:
account == 1, currency == 'EUR'
account == 1, currency == 'USD'
account == 1, currency == 'IDR'
account == 1, currency not in ('EUR', 'USD', 'IDR')
account == 2, currency == 'EUR'
account == 2, currency == 'USD'
account == 2, currency not in ('EUR', 'USD', 'IDR')
… which has the effect that for account 2, currency IDR, the rule does not fire. For the business analysts building the rules, this does't make a lot of sense, as they're expecting it to mean:
account == 2, currency not in ('EUR', 'USD')
Unfortunately this means that if a currency is permitted for one account, then a row must be added for every other account, indicating that the currency is not permitted.
I'm trying to achieve a sensible default (fire the rule to reject the trade) unless the currency is explicitly permitted.
Is there a decent mechanism for achieving this in a decision table?
One alternative I can think of is to create a technical rule which logically inserts a rejection which exists as long as this rule hash't fired. But I would really prefer to avoid doing anything like that, as I reckon it would be something of a maintenance nightmare.
Any thoughts?
Cheers,
Steve
12 years, 4 months
Best design pattern for: Set of events with countdown timers?
by dunnlow
Hi,
I am receiving events from a group of about 15 different event producers -
each with different names (located in the message). I want to make sure
that I get at least one event from each of those 15 producers within a
pre-determined period of time; the period can be different for each
producer.
I am planning to use a template rule to relate producer name to time period.
Then, I'll insert a "myTimoutObject" for each producer (not quite sure yet
where/how I'll do that) which will count down from the provided time period
and trigger an "alert" condition if they reach zero (and reset whenever a
new event from that producer arrives into the ksession).
Does anyone have experience with a better way to implement this count-down
pattern?
Thanks for any insight,
-J
--
View this message in context: http://drools.46999.n3.nabble.com/Best-design-pattern-for-Set-of-events-w...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Eclipse, Groovy and Drools - java.lang.NoClassDefFoundError
by sweeneymj
Hi,
I have just started trying out Drools and having an issue trying to run the
sample applications under Eclipse Helios with Groovy installed.
When I try run any sample Drools application I get the stack trace shown
below. I have looked around extensively on Google for assistance but have
been unable to find any thing that has helped me determine what the issue
is.
Any suggestions would be appreciated.
Regards
--
Build groovy files option has not been set one way or the other: use
'options.put(CompilerOptions.OPTIONG_BuildGroovyFiles,
CompilerOptions.ENABLED);'
java.lang.NoClassDefFoundError: org/eclipse/core/runtime/Plugin
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.eclipse.jdt.internal.compiler.Compiler.initializeParser(Compiler.java:737)
at
org.eclipse.jdt.internal.compiler.Compiler.<init>(Compiler.java:294)
at
org.eclipse.jdt.internal.compiler.Compiler.<init>(Compiler.java:159)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:364)
at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:51)
at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:366)
at
org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:55)
at
org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:69)
at
org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:674)
at
org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:633)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:278)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:451)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:40)
at com.sample.DroolsTest.main(DroolsTest.java:23)
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.Plugin
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 27 more
--
View this message in context: http://drools.46999.n3.nabble.com/Eclipse-Groovy-and-Drools-java-lang-NoC...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Audit Logs: Business Case? Any pearls of wisdom?
by BenjaminWolfe
Hello all,
My company is just venturing into Drools, and I'd like to help make the
endeavor as successful as possible. We'll be incorporating the rules engine
into a broad range of use cases (depending on how successful the first few
are, of course), with a wide range of business users, most of them using the
Guvnor interface.
It seems to me we'll want some sort of audit log in the form of a
transaction-level table, simply to answer the question (in any given case,
for any reason) of /what happened?/. On the other hand, a transaction-level
table -- for a whole set of rules -- for a *lot* of facts (built up over
time) -- could get pretty big. And our tech folks might not want to
allocate resources to store and maintain the table. So I have a couple of
questions for the more experienced Drools users:
1. How might you build a solid business case for such logging? Do you have
any specific examples of the problems an audit log would solve, or the
benefits it would create?
2. How common is it to keep audit logs? Do almost all of your projects
include them, almost none, or somewhere in between?
3. Maybe I'm missing some nuance. Do you include audit logs of some rules
fired, in some applications, but not others? Any other nuggets of wisdom?
Thanks everyone,
Benjamin
--
View this message in context: http://drools.46999.n3.nabble.com/Audit-Logs-Business-Case-Any-pearls-of-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Decision table help
by Mahadevappa, Shobha
Hi,
I have scenario where I need to compare attributes of two different instances of an object in the decision table.
The scenario is - say I have 5 instances of an object ObjA.
ObjA has an attribute mail_id.
I need to compare the maild_id attributes of the ObjA instances to figure out if they do not match (Ex: instance1.maild1 <> instance2 maild)
Can you please let me know how this can be achieved using the decision table.
Regards,
Shobha M | Senior Program Manager, A&AD | NTT DATA Global Delivery Services Limited| w. +91-80-26659482 (Ext 3679) | v. 8814.3679 | m. +91.9972522743 | shobha.mahadevappa(a)nttdata.com<mailto:shobha.mahadevappa@nttdata.com>
______________________________________________________________________
Disclaimer:This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding
12 years, 4 months
DRL to Decision Table
by Mahadevappa, Shobha
Hi,
Please let me know if there is any tool to convert .drl file to a decision table.
Any pointers rgding this very much appreciated.
Regards,
Shobha M
______________________________________________________________________
Disclaimer:This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data. If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding
12 years, 4 months