Use of Otherwise in converted decision table in Guvnor.
by Manasi
Hi,
1) I am using new feature of Guvnor 5.4 i.e converting from decision table
in excel format to Guvnor web Decision Table format.
After excel decision table is converted to Guvnor web Decision table format
,I am not able to use *'Otherwise'* feature for rows in guvnor decision
table.
If Guvnor decision table is created manually then only I am able to use
*Otherwise* in rows.
2) Also ,if Guvnor web decision table is created manually then *Otherwise*
in rows can be use only for String literals . Can it be use for Boolean
variables?
Please let me know what steps needs to be taken.
Thanks,
Manasi Damle
--
View this message in context: http://drools.46999.n3.nabble.com/Use-of-Otherwise-in-converted-decision-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Add calendars to knowledge session from Spring?
by dunnlow
I am using the Drools 5.4 integration server in a stateless session. I have
it running fine with the example. Now, I want to use custom Quartz
calendars in my rules. The only way I could come up with to do this in
Spring (a la integration server) was to create a bean that takes a ksession
constructer then creates the calendars and adds them to that ksession.
I see that the bean is created with a knowledge session and all seems ok,
but none of my calendar-based rules ever fire regardless of how the
calendars are configured. (I test the calendars in my bean (with a call to
isTimeIncluded()) and they seem to be in working order.
Also weird is that bean's constructor gets called twice and with two
different knowledge sessions. Once when I start the application, and then
again when I send to the rules service.
1) What is the right was to add custom calendars to a knowledge session (via
Spring)?
2) Any idea why my bean is getting called twice with different knowledge
sessions?
Thanks for any insight. -J
---in knowledge-service.xml
<drools:ksession id="ksession1" type="stateful" kbase="kbase1"
note="node1"/>
<bean id="myCalendar" class="org.test.MyQuartzCalendarLoader">
<constructor-arg ref="ksession1"/>
</bean>
--- MyQuartzCalendarLoader.java
public class MyQuartzCalendarLoader {
private static StatefulKnowledgeSession thisSession=null;
public MyQuartzCalendarLoader (StatefulKnowledgeSession thisKs) {
//gets called twice?
thisSession=thisKs;
print thisSession.tostring() -- looks ok
WeeklyCalendar calendar = new WeeklyCalendar();
org.drools.time.Calendar onlyWeekDays =
QuartzHelper.quartzCalendarAdapter(calendar);
calendar.setDayExcluded(Calendar.WEDNESDAY,false) -- I toggle
just to test
print onlyWeekDays.isTimeIncluded(now.getTime()); --- also
works as expected
Calendars cals =
thisSession.getCalendars().set("ONLYWEEKDAYS",onlyWeekDays);
}
}
--- test.drl
rule "weekdays" dialect "mvel" <-- This rule never fires unless i
remove calendars.
calendars "ONLYWEEKDAYS"
when
$m:Message()
then
$m.text = "FIRED"
end
--
View this message in context: http://drools.46999.n3.nabble.com/Add-calendars-to-knowledge-session-from...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Best model for planning?
by mvermand
Hi,
I'd like some advice on how to make my model.
I need to plan maintenance-schedules for - let's say - airplanes.
Constraints are:
- planes are only at given moments available for maintenance (when not in
the air ;-)
- maintenance of a planes requires a number of techniciens (with specific
skills).
- techniciens have skills and also shifts and vacation.
Now, first I tought to make the maintenance of a plane the planningEntity.
But I did not know how to populate and match the techniciens.
So, second I tought to make a new Task-class the planningEntity.
A Task is a job that needs to be done by a technicien with specific skills.
Maintaining a plane requires then a number of tasks.
If I choose this model, I think I'll have to pass two Plannings variables to
the Task planningEntity:
1) a Maintenance-fact (Plane + Period + list of required tasks) and
2) a Technicien-fact (?)
Then I'll need to check if availabity of plane and availability of
technicien match and also skill-requirement of task and skills of
technicien.
Do you think this second model is the right one?
Will it perform well?
=> ? matching all combinations of plane availabilty and
techniciens-availability and -skills.
Thanks in advance
--
View this message in context: http://drools.46999.n3.nabble.com/Best-model-for-planning-tp4019464.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Insert global into working memory via Spring?
by dunnlow
I am using the drools 5.4 Integration Server (with Guvnor).
I have two instances of the Integration Server and (ideally) one instance of
the rules in Guvnor. I would like to create some rules that depend on the
instance of the Integration Server on which they are running. The vision is
that I would set a global variable somewhere that provided the server name
then use that variable in my rules.
I thought about adding a global variable via guvnor package configuration,
but I can only declare it (not set it). Also, if I could do that, I would
need another knowledge base, which I am trying to avoid.
I am considering setting up a declared object (so that the rule just fires
once) and a rule that if the object doesnt exist, creates it and calls a
function that checks a System Property and sets the value (I know, I've read
not to set globals in rules). If this rule has a high salience, this seems
like it could work - but is REALLY ugly.
Is there a better way?
Basically, I think I want to inject that value into the knowledge session
via Spring.
Thanks for any thoughts,
-J
--
View this message in context: http://drools.46999.n3.nabble.com/Insert-global-into-working-memory-via-S...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
PlanningVariables are sometimes null
by Michiel Vermandel
Hi,
I've got an planningEntity with two planningVariables.
For both variables I build a list of objects.
While solving, it seems that the planningEntity objects are sometimes called without setting the planning variables.
When I read an attribute of such a variable in a rule I get a NPE, ofcourse.
Is it possible to always have the planningsvariables to be set before executing a rule?
Or am I missing the obvious?
Thanks,
Michiel
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
12 years, 3 months
rules not being reconsidered after modify
by wichtl
Hi,
I'm new to using Drools and its probably just a problem with me
understanding how this works, but I've tried everything i can think of, so I
come to you in hope for some help!
I have a set of rules which modify an object in the RHS and another set of
Rules that should be fireing after the modification of the object.
Rule modifying the Object:
rule "Wenn der BMI des Patienten >= 18.5 und < 25 ist, dann gehört der
Patient der Kategorie 'Normalgewicht' an und hat ein 'durchschnittliches'
Risiko für Begleiterkrankungen des Übergewichts"
when
MessdatenVonPatient($patient : patient && (getMessdaten().getBmi() >=
18.5) && (getMessdaten().getBmi() < 25))
$krankheitsbildVonPatient : KrankheitsbildVonPatient(patient == $patient
&& $krankheitsbild : krankheitsbild)
then
modify($krankheitsbild){setAdipositasGrad("Normalgewicht"),
setRisikoBegleiterkrankungGrad(1)
}
end
Rule that should fire after the modification:
rule "Wenn Patient der Kategorie 'Normalgewicht' angehoert, dann werden
folgende Maßnahmen vorgeschlagen"
when
KrankheitsbildVonPatient($patient : patient, krankheitsbild.adipositasGrad
== "Normalgewicht")
then
System.out.println("Some Text");
end
Also I have encountered problems (application freezes) when trying to modify
the "$krankheitsbildVonPatient" object in the RHS. And I still don't
understand why it did freeze and why modifying "$krankheitsbild" does not.
Heres my datamodel if needed:
http://drools.46999.n3.nabble.com/file/n4019463/dataModel.drl dataModel.drl
Best Regards,
wichtl
--
View this message in context: http://drools.46999.n3.nabble.com/rules-not-being-reconsidered-after-modi...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 3 months
Job Opportunity - Jboss, Drools, Java Architecht/Consultant
by Pamela McGrath
I have a job opportunity available for a technology professional experienced in java, jboss and drools. This is a great opportunity and I wanted to extend it to this community. I have included some information regarding the job, if you have anymore questions, are interested, or know someone who may be interested in this opportunity please contact me at pamela(a)ttechsolutions.net
Job Description
Java Technology professionals develop applications using Java technology, a bundle of related technologies from Sun Microsystems that allow for developing and running operating system-independent programs written in Java programming language. This role provides opportunity to further develop Drools skills.
Key responsibilities may include:
- Lead the technical design process by participating in the analysis of technical application requirements
- Guide the client through key architecture design decisions
- Provide recommendations on application and architecture for performance and scalability
- Conduct analyses that will identify functional requirements and technical specifications as related to people, processes and technology
- Implementing the technical infrastructure
- Provide oversight and support client technical directors in the integration of technical and application components
- Executing conversion plans and documenting possible improvements; identifying disruptions in the processes
- Lead the technical team
Basic Qualifications
* 5 years Java development experience
* 6 months of DROOLS experience
* 3 months of DROOLS Planner experience
Professional Skill Requirements
* Architecture design experience
* Tech lead experience tech lead experience
* Federal government / large corporation experience
* Ability to work as a team member
* Collaboration skills
* Ability to work creatively and analytically in a problem-solving environment
* Desire to work in an information systems environment
* Excellent oral and written communication skills
* Flexibility
* Time management skills
Pamela McGrath
Operations Coordinator | pamela(a)ttechsolutions.net<mailto:pamela@ttechsolutions.net>
T-Tech Solutions | 1779 W. Big Beaver Rd | Troy, MI 48084
(p) 248-616-9600 | (f) 248-928-0981 | http://www.ttechsolutions.net<http://www.ttechsolutions.net/>
12 years, 3 months