Tell me to RTFM
by ronalbury
I am sure this must be a case of RTFM, but please tell me which FM and if
there is a section, in particular I should read.
I am running JBoss Designer Studio 4.1.1.GA. It allows me to create RF
files and comes with a number of Flow (or should I say jBPM) components, but
not all of them. Do I need to download and install the full jBPM to get the
rest of the components in eclipse?
The feature I most want now is *embedded sub-process*. I have been trying
to play with *reusable sub-process* to get a feel for sub-processes in
general, but I'm stuck here too ... I'm sure this is another RTFM. I assume
that when I am designing an RF I should be able to reference another RF to
use as the sub-process as part of the graphical RF definition. The other
jBPM components (e.g. RuleTask, Gateway, etc) have pretty self-explanatory
properties ... but when I look at the reusable sub-process I see no way to
indicate what RF I want to use for that sub-process.
Thanks in advance
--
View this message in context: http://drools.46999.n3.nabble.com/Tell-me-to-RTFM-tp3570837p3570837.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months
Setting typesafe in decision tables
by abr
In Drools 5.3, is it possible to add the typesafe notation to an object
within a decision table?
The idea behind this question is to be able to define conditions on fields
that cannot be resolved at compile time but that can be at runtime.
(e.g. define conditions on event.payload.field1 where event.payload is a
java.lang.Object and field1 an attribute of the object's class set in
event.payload at runtime)
I've tried to disable MVEL strict mode but without success.
Note: this worked in Drools 5.1 because of the more permissive parsing
method.
By the way, if you have other ideas that should work, I opened to them :-)
Best,
Alexis
--
View this message in context: http://drools.46999.n3.nabble.com/Setting-typesafe-in-decision-tables-tp3...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months
Hard constraints to enforce employee seniority
by Patrik Dufresne
Hi all,
I'm trying to create rules to model my problem. So far, I didn't manage to
create rules to make Drools converge to a solution because of score traps.
I don't see any way to avoid it (as I'm not an expert with Drools). I can
express the rule as follow : a senior employee should work before a less
senior employee.
I've implement it as a hard constraint :
rule "hard-Seniority"
when
$employee : Employee()
$assignment : PlanifEventAssignment( $planifEmployee : employee )
not PlanifEventAssignment( employee == $employee )
eval(Helper.compareEmployee($employee, $planifEmployee) < 0)
then
insertLogical(new IntConstraintOccurrence("hard-Seniority",
ConstraintType.NEGATIVE_HARD,
1,
$employee, $assignment));
end
The function Helper.compareEmployee(e1, e2) return -1 if e1 is more senior
then e2 (mostly based on hire date and other boolean fields).
This way, the rule make sure a senior employee is working. But it's a score
trap since, many moves are required to resolve the constraint. e.g:
PlanifEventAssignment1 = e2
PlanifEventAssignment2 = e3
PlanifEventAssignment3 = e4
PlanifEventAssignment4 = e5
e1 is not working. Multiple move are require to reach the best solution :
PlanifEventAssignment1 = e1
PlanifEventAssignment2 = e2
PlanifEventAssignment3 = e3
PlanifEventAssignment4 = e4
So I'm asking you. What is the best way to make Drools converge ? Do I need
to change my rule, or should I create a BigMove ?
--
Patrik Dufresne
14 years, 7 months
Breakpoint on DRL rule file not catching
by Colwell, Dave
Breakpoints in my DRL files are not causing the Eclipse debugger to pause the
running thread. My Macbook Pro (Lion) is configured with the following:
- Eclipse Indigo
- GEF
- Drools plugins (Core, Guvnor, Task) from JBoss Tools
- The Preferences | Drools | Installed Drools Runtime is configured with a
single checked entry pointed to the binaries folder in a Drools 5.3.0
distribution.
I can create a Drools project, which also generates a simple DroolsTest.java
and Sample.drl file. I'm able to set breakpoints in the RHS of the rules.
However, when I Debug the DroolsTest.java as a Drools Application the
breakpoints never catch.
Thank you for any recommendations.
Dave
14 years, 7 months
Drools & jBPM at ICAART (Portugal) 4th International Conference on Agents and Artificial Intelligence
by Mark Proctor
<http://4.bp.blogspot.com/-_b77C8kLxEk/TuDUJkn_TlI/AAAAAAAAAnY/_QPFAuMEdOo...>
Droosl & jBPM @ ICAART 2012 is now confirmed, and myself (Mark Proctor)
and Dr Davide Sottara will be there. If you have any interesting
research on or with Drools & jBPM that you would like to present on the
day, let us konw.
6-8 Febuary 2012
Vilamoura, Algarve, Portugal
http://www.icaart.org/tutorials.asp
The day is a tutorial day aimed at all levels. It will start with
general introductions to the technology but will slant off to more of
our research based projects such as Drools Semantics and Chance, as it's
part of an academic conference. We would also like to give an
opportunity for the people to present their own research, slots can be
anything from 20minutes to 60 - contact me if you are interested
mproctor at codehaus d0t org.
There will also be plenty of time for discussions and help with your own
projects.
*Abstract*
Drools is the leading open source, industry focused, rule engine. While
Drools started life as a Rete based forward chaining engine, it has
since transcended. It's ongoing mission is to explore declarative
paradigms from a practical and industrial perspective, to boldly go
where no engine has gone before.
The tutorial will start with a gentle introduction, suitable for all
level of expertise, covering the core language and functionality slowly
expanding into more complex areas. The topics covered include, but are
not limited to:
Basic Concepts:
* Patterns, Constraints and Unification
* Data Driven and Goal Oriented Inference using Forward Chaining and
(Opportunistic) Backward Chaining
* Truth Maintenance
* Temporal Reasoning and Complex Event Processing
* Functional Programming
* Traits and Declarative Models
Advanced Topics:
* Decision Tables
* Rule and Workflow Integration
* Hybrid Rule-Based Systems
* Agents and Services
* Unified Testing
*Brief biography of Mark Proctor*
Mark Proctor received his B.Eng in Engineer Science and Technology and
then his M.Sc. in Business and Information Systems; both from Brunel
University, West London. His M.Sc. thesis was in the field of Genetic
Algorithms; which is where he discovered his interest for anything AI
related.
Mark became involved in the Drools expert system project at an early
stage and soon became its project lead. Mark then joined JBoss (later
acquired by Red Hat) as an employee when the Drools project was
federated into the JBoss middleware stack.
Mark now leads the effort at Red Hat for a unified platform for
declarative technologies; with a focus on rules, event processing,
workflow, semantics, distributed agents and governance.
*Brief biography of Davide Sottara*
Davide Sottara received his Ms. Degree in Computer Science(2006) and his
Ph.D (2010) in Computer Science, Electronics and Telecommunications from
the University of Bologna.
His research and development interests include Artificial Intelligence
in general and Decision Support Systems in particular, focusing on
hybrid systems combining predictive models and rule-based systems.
Since 2006, he has been working on the development of intelligent DSSs
in the environmental and medical field. He is a member of the Drools
open source Community, leading a sub-project on the extension of
production rule engines to support hybrid and uncertain reasoning, and
he's also involved in the RuleML rule language standardization
initiative. He is currently working on remote health-care systems
enhanced with AI-based predictive, diagnostic and planning features.
*Contacts*
e-mail: icaart.secretariat(a)insticc.org
<mailto:icaart.secretariat@insticc.org>
14 years, 7 months
Need clarification on how event expiration offset is calculated in 5.3.0.FINAL
by Scott Embler
Hi,
I've recently started using some of the temporal operators that drools
supports (coincides, starts, finishes, during) and have had trouble with
events not being expired, causing severe memory consumption.
I'd first like to make sure that I'm using these operators appropriately,
so as a test case I have rules like:
declare A
@role( event )
@timestamp( timestamp )
@duration( duration )
end
declare B
@role( event )
@timestamp( timestamp )
@duration( duration )
end
rule "coincides events"
when
$a: A() from entry-point "a"
$b: B(this coincides $a) from entry-point "b"
then insert("coincides"); end
With classes like:
public class A{
public final long timestamp;
public final long duration;
public A(long timestamp, long duration){
this.timestamp = timestamp;
this.duration = duration;
}
}
//B is identical to A.
Using a knowledge base configured with stream mode, and a knowledge session
with a pseudo clock I'd run this test:
A a = new A(0, 1000);
B b = new B(0, 1000);
entryPointA.insert(a);
entryPointB.insert(b);
clock.advanceTime(1000, TimeUnit.MILLISECONDS);
ksession.fireAllRules();
In this test I'm expecting that the rule will fire to insert "coincides"
and expire both A and B. But instead, "coincides" is inserted, B is
expired, but A remains in memory permanently. If I use jvisualvm to
inspect the expirationOffset for A, I see that it is the Long.MAX value of
9223372036854775807. This behavior persists even after adding an explicit
expiration to A. I was under the impression that the offset would be zero
(of close to it) since Drools would only need to retain A until the clock
reaches A's endTimestamp. The documentation does not cover the calculation
of event expiration in great detail, so have I missed something? Thanks in
advance.
14 years, 7 months
Dynamic Fact(field) Generation in Declarative Model
by srinivasasanda
Hi All,
Please help on this issue
I created a declarative model Person in personDetails package in Drools
Gunvor with 2 fields(age,amount).Now,I need to insert one field with name
gender and datatype String into that declarative model through POJO
class..Here is my code
RuleAgent agent = RuleAgent.newRuleAgent("/Guvnor.properties");
RuleBase rb = agent.getRuleBase();
WorkingMemory workingMemory = rb.newStatefulSession();
PackageBuilder pkgBuilder=new PackageBuilder(rb);
FactType personType = rb.getFactType( "persondetails.Person" );
ClassDefinition cDefinition=(ClassDefinition)
rb.getFactType("persondetails.Person");
FieldDefinition gen = new FieldDefinition( "gender",
"java.lang.String" );
product.setKey(true);
cDefinition.addField(product);
workingMemory.insert(cDefinition);
FactHandle fc=workingMemory.getFactHandle(cDefinition);
workingMemory.update(fc, cDefinition);
rb.newStatelessSession().execute(new Object[] {cDefinition});
}
String s1=cDefinition.getField(0).getTypeName();
String name1=cDefinition.getField(0).getName();
System.out.println(s1);
System.out.println(name1);
String s2=cDefinition.getField(1).getTypeName();
String name2=cDefinition.getField(1).getName();
System.out.println(s2);
System.out.println(name2);
String s3=cDefinition.getField(2).getTypeName();
String name3=cDefinition.getField(2).getName();
System.out.println(s3);
System.out.println(name3);
Output as Age---Java.lang.Integer
Amount-java.lang.Integer
Gender--Java.lang.String..
And when i am printing
It is executing successfuly first time without errors.but i could not find
gender in declarative model.It is failed to inserting.Can anyone help me in
this..plZzzzzz...I was struggling with this....
When Iam executing second time it is displaying as Exception:couldnot find
gender in declarative model..It means iam unable to commit Data into
Server..(Drools guvnor Model)
Please help on this....
--
View this message in context: http://drools.46999.n3.nabble.com/Dynamic-Fact-field-Generation-in-Declar...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 7 months