Trying to make drools-debugging (Eclipse) work in "FIT for rules"
by ingo_mytoys
Hi folks,
I'm happy that I recently discovered both the Eclipse debugging views for
Drools (working memory, agenda) and the FIT for rules framework. Since our
development project itself can't be tested as Drools-Application I'd like to
use FIT for acceptance-tests and debugging. Might be a smooth solution.
However, I don't manage to make drl-file-breakpoint-debugging work in the
fit-project, being run as Drools-application. It just won't stop the program
flow. With the parallelly installed drools-example-project however
everything works just fine.
Do you have an idea, what I might have to change in the project settings or
the code to get breakpoints work in the fit-project?
Facts for both, drools-examples and fit:
Eclipse Indigo
Drools 5.3.Final
Eclipse-Tools from Drools 5.4.BETA (because audit-view has a bug in 5.3)
Breakpoint is set only at then-part of rules :-)
Thanks a lot for your help!
Cu,
Ingo
--
View this message in context: http://drools.46999.n3.nabble.com/Trying-to-make-drools-debugging-Eclipse...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months
setting global variables in session : the Command interface VS the RuleContext. What is the difference ?
by Ahmed Feki
hi ,
i m new in drools, i m reading the Drools-JBoss-Rules-5.0-Developers-Guide
book in which i found a validation rule example on its chapter 3. In this
exemple, global variables were set into the session with two methods shown
in this code :
...
session = knowledgeBase.newStatelessKnowledgeSession();
session.setGlobal("reportFactory", reportFactory);
session.setGlobal("inquiryService", inquiryService);
...
and these variables qualified as immutables, were called from the
RuleContext
public static void error(RuleContext drools,
Object... context) {
KnowledgeRuntime knowledgeRuntime = drools
.getKnowledgeRuntime();
ValidationReport validationReport = (ValidationReport)
knowledgeRuntime.getGlobal("validationReport");
ReportFactory reportFactory = (ReportFactory)
knowledgeRuntime.getGlobal("reportFactory");
...
and for other variables(or facts ) the Command interface was used instead :
List<Command> commands = new ArrayList<Command>();
commands.add(CommandFactory.newSetGlobal(
"validationReport", report));
commands.add(CommandFactory
.newInsertElements(getFacts(customer)));
session.execute(CommandFactory
.newBatchExecution(commands));
i m looking for accuracy in understanding when and which to use each
method.
13 years, 12 months
Drools Performance and Maintanability
by dollanitri
Hello,
Recently i started playing out with Drools Guvnor GUI and created couple of
rules based on DecisionTable
GUI Editor and also ruleflows in eclipse.
Then integrated Drools with Java Custom Web Application and tried out
executing rules on front end by changing rules on the drools guvnor at run
time. All seems to be working fine as per expected.
But i have couple questions would like to ask related to performance and
maintainability of the drools.
Questions:
1) does drools guvnor provides any option to make revisions for the decision
tables ?
(Eg. If more than single developer working on the same decisiontable and
making modifications to it then
it should allow to merge all the changes into main one.....)
2) how to measure performance of the drools to make it work and available
for the large rule datasets?
3) There are options to store data in a different formats like repository
(default one), Oracle, mysql.....etc
which one is better if i want to make my data backup very easily and import
it back whenever i need ?
4) is it drools is good one to replace with Yasu?
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Performance-and-Maintanability-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months
Unable to view drls in guvnor
by arup
Hi all,
I have my guvnor deployed in WAS. Now i added the POJO model and drls from
RAD(rational app developer) to my guvnor. I'm able to fire the rules from
guvnor by using url for package source. But the problem is i'm not able to
view any rules inside technical rule asset. but if i open the url for
package source i can view the imports and rules inside them. Any idea about
why this is happening?
Thanks a lot in advance... :) :) :)
--
View this message in context: http://drools.46999.n3.nabble.com/Unable-to-view-drls-in-guvnor-tp3919043...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months
Planner 5.3.0 Final - Issue with Local Search / Move
by duggal
I am solving a resource allocation problem using the Planner and have run
into a few issues with the use of Local Search.
The objective is to assign tasks to a set of resources. Each task has a
start and end time and NO task should overlap each other for the same
resource. There are other rules for preference and mandate of certain tasks
to certain resources.
I am using the FIRST_FIT construction heuristic which works fine.
I have implemented a Resource Change Move which assigns a new planning
variable to my planning entity. There seem to be issues with this phase.
**Problem** -
1. While looking at the solution created at the end of the local search
phase AND comparing to the moves output in the log file. I see that there
are several instances where the log file shows a move BUT the output
solution has the entity still on the previous planning variable.
This is happening only towards the end of the phase (about last 8 steps) of
the time terminated phase.
2. I have a rule in the DRL score file which prevents overlap of allocations
of the task for the same resource. I have instances where the construction
heuristic violated this constraint. The local search solver then moved one
of the overlapping entity to another resource. However the final output
shows the constraint still EXISTS between the two entities (even though the
overlap is no longer present). As a result even though the constraints are
actually removed, the score is NOT going down as the planner constraints
still exist.
The rule used by me is as follows (Allocation is the planning entity and
resource is the variable) -
rule "noOverlapAllocations"
when
$allocation1 : Allocation($id : id, $resource : resource, $task :
task, resource != null)
$allocation2 : Allocation(id > $id, resource == $resource,
isOverlap($task), $id2 : id)
then
insertLogical(new IntConstraintOccurrence("overlapAllocation",
ConstraintType.NEGATIVE_HARD, 1, $allocation1, $allocation2));
end
Please help me resolve these issues.
Thanks
Vikram
--
View this message in context: http://drools.46999.n3.nabble.com/Planner-5-3-0-Final-Issue-with-Local-Se...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months
Remote debug as Drools App on Eclipse
by rogelio_sevilla1
Good day everyone, sorry if this is a basic question.
I'm using eclipse and I know that you can debug an App as a Drools
application to be able to debug the .drl contents. I have always used this
feature on apps that reside on my local machine.
I have also used the "Debug as a Remote Java Application" feature within
eclipse, however, I honestly don't know how to Debug a Remote App as a
Drools Application; is it possible??
Thanks a lot in advance for your time.
--
View this message in context: http://drools.46999.n3.nabble.com/Remote-debug-as-Drools-App-on-Eclipse-t...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months
Knowledge Agent subdirectry scanning
by rogelio_sevilla1
Hello everyone,
I have already searched for this, and although is quite simple, I just don't
find how to do it. I want my knowledge agent to scan the subdirectories that
lie within the directory specified on the changeset.
Suppose my changeset has this:
<resource source='file://home/myuser/myrules/' type='DRL' />
The agent scans the drl files within my /home/myuser/myrules/ folder, but
if I add another folder like
/home/myuser/myrules/mysubdirectory , the agent does not find them, is
there any option I'm missing?? , I'm using drools 5.1.1 .
thanks a lot in advance :)
--
View this message in context: http://drools.46999.n3.nabble.com/Knowledge-Agent-subdirectry-scanning-tp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months
Re: [rules-users] Sir, Seekin your's Help on Drool
by Wolfgang Laun
San,
(1) Do NOT post the same thing four times.
(2) Do NOT start with decision tables. After one month you should be
able to write a simple rule in DRL.
(3) Do NOT post questions without providing sufficient context. is
maturityAge a field of PremiumCalculatorFormBean? Why do you define
this function getMaturityAge? How is it defined?
(4) Do NOT say that there is an error unless you show sufficient
context. You do not pass "pp" to any function in the code you show -
so what's the point in saying "not able to find" etc.
(5) Use the list, do NOT email me directly. I answer the list if I
have the time.
-W
On 18/04/2012, Sangram Jethy <sangram.jy(a)gmail.com> wrote:
> Hi
>
> I am a student who recently working as a java developer on drools.I have
> been going thru drools over last one month.
>
> Nw I hav a couple of doubt...i am struck ....pz reply me if u cud find time
> out of yr busy schedule...
>
> I am trying to cal a local function getMaturityAge() in the decision table
> condition column like
>
> RuleTable MaturityAge Validation
> CONDITION
> ACTION
> pp:PremiumCalculatorFormBean
> getMaturityAge() > "$1"
> System.out.println("invalid maturity age");
> Premium Payment Term Print out
> message?
> 70 X
>
> The method is defined localy using functions key word.
> This is showing error in function line is ...... getMaturityAge() >
> "$1"......
> And moreover whenever I trying to pass pp as the argument to my functions,
> its not able to find pp. I am getting cud not parse knowledge error.
> Pz tel me how to make it work...
>
> Also pz suggest some extensive reading material for rules both in( ddr and
> decision table format ). I am also goin thru d documentation n Mr Paul
> Brown book. But i cudnt find more on using decision table and its syntax.
> Pz suggest me on dat.
>
>
> Tnks n Regards
>
> Sangram Jethy (San)
>
13 years, 12 months
JBPM 5 Console
by Alberto R. Galdo
Hi,
Our set-up consists in a KnowledgeSession that lives in an OSGi
environment wich contains rules, processes, events, .... and it is
connected to an Guvnor installation in a JBoss aplication server ...
What we are trying to accomplish is to be able to use the JBPM Console
with our current Knowledge Session. Our plan is to install JBPM-Console in
our current JBoss connected to our session in the OSGi container ( Equinox
).
There seem to be a lack of documentation for this kind of installation
and in the manual the automated installation is recommended ( the one that
has Guvnor, JBPM Console, Drools, etc... all in one package ). We've
tested the automated installation and indeed there it is the console,
drools and so on, and it works, but when we peek at the code to find ways
of integrating our "remote" ( at least in another virtual machine )
session we saw that whenever jbpm-console doesn't find a current knowledge
session it starts one in the current virtual machine using processes,
rules that exist there on purpose. In other words jbpm-console seems to
work only for local ( as in the same virtual machine ) knowledge sessions.
Also there's an integration API wich solves this problem and abstracts
different knowledgesessions providers from the knowledge-api point of view
... but we couldn't find any definitive documentation that fills the gaps.
Can you give us any pointers to documentation on the subject. Will we be
able to get a JBPM-Console accessing ( and managin ) our processes living
in a session on another virtual machine?
Best regards,
Alberto R. Galdo
argaldo(a)gmail.com
13 years, 12 months
jbpm and rule flow
by sumatheja
Hi All,
I'm a bit confused regarding the differences between the two. I
understand that JBPM is a complete workflow with full workflow
capabilities. But will the rule-flows continue to work? I've created a
sample rule-flow, but it doesn't work until I put the jbpm jars in the
classpath. I can remember in older versions of drools I never used to
import these jars seperately.
Is it recommended to continue writing rule-flows with the latest
versions?? I'll be grateful if someone can provide me a link where I can
get my confusions cleared.
Thanks in advance
--
cheers
Sumatheja Dasararaju
13 years, 12 months