[rules-users] Upgrade from jbpm 5.1 to 5.2

2011-08-22 Thread houghvw
Hi,

I am looking for documentation to upgrade from drools jbpm 5.1 to 5.2. It
seems that the variable persistence strategies have been replaced with a
object marshaling strategy architecture. I can't find documentation
regarding this.

I am using jpa persistence for my flow state. Is there some sort of
migration script to migrate the jbpm domain model from 5.1 to 5.2.

Regards
Hough

--
View this message in context: 
http://drools.46999.n3.nabble.com/Upgrade-from-jbpm-5-1-to-5-2-tp3277185p3277185.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Using JBPM 5 with Container Managed Persistence

2011-08-22 Thread houghvw
Hi,

Thanks for the reply. I use JBPM for some business transaction flow
orchestration. I run the JBPM layer over a stateless session bean layer to
manage business logic underpinned by jpa for persistence. My stateless
session beans are all container managed beans so having JPBM use bean
managed persistence is a bit messy in my architecture.

Regards
Hough

--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-JBPM-5-with-Container-Managed-Persistence-tp3261549p3277179.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Websphere 7.0 and Drools Guvnor 5.2 Integration

2011-08-22 Thread Tihomir Surdilovic
Hi Henry,
I vaguely remember seeing the same problem in WAS6. WebSphere 
documentation says:
A username and password must be specified in the callback handler. 
Custom classes that are added to the Subject on the client side should 
get propagated to the server automatically whenever security attribute 
propagation is enabled. You can set the password to null if you want to 
use identity assertion without a password. 
(http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/tsec_pacs.html)

So when either a null or an empty string password is supplied to the WAS 
login module, it takes it as an implicit sign that you want to do 
identity assertion instead of authentication, and therefore succeeds as 
long as the user id is valid.

As a workaround, I have seen people write their own login module that 
simply rejects any null or empty password. Then they chain this login 
module with the native WebSphere login module, so the latter can check 
credentials where a password is supplied. This is just a workaround 
however. Again I am not a WAS expert and you should probably contact one 
for further help.

Hope this helps.
Tihomir
On 8/22/11 8:01 PM, hpham1067 wrote:
> I've Guvnor working with Websphere 7.0 pretty well. That said, I've having
> problem using JAAS with WebsPhere WSLogin login implementation module, i.e.
> com.ibm.ws.security.common.auth.module.WSLoginModuleImpl. It seems that
> Guvnor will accept the any user authentication if you specify a blank
> password at the login screen. If you type in a wrong password in it work as
> expected but a blank or no password Guvnor will let the user login no
> question ask. Has anyone encounter this issue. Thanks in advance for your
> help.
>
>   - Henry
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Websphere-7-0-and-Drools-Guvnor-5-2-Integration-tp3276699p3276699.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Websphere 7.0 and Drools Guvnor 5.2 Integration

2011-08-22 Thread hpham1067
I've Guvnor working with Websphere 7.0 pretty well. That said, I've having
problem using JAAS with WebsPhere WSLogin login implementation module, i.e.
com.ibm.ws.security.common.auth.module.WSLoginModuleImpl. It seems that
Guvnor will accept the any user authentication if you specify a blank
password at the login screen. If you type in a wrong password in it work as
expected but a blank or no password Guvnor will let the user login no
question ask. Has anyone encounter this issue. Thanks in advance for your
help.
 
 - Henry 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Websphere-7-0-and-Drools-Guvnor-5-2-Integration-tp3276699p3276699.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Are if/then rules possible?

2011-08-22 Thread Yu Chai
I was working on a similar scenario. My solution is when rule A fired,
insert a fact AF. Rule B's LHS detects if there's an instance of AF and it's
only fired if so. And I don't think you can do "else" in a rule now. So you
may consider split rule A into two rules to fire either B or C.

Regards

Yu

2011/8/23 Matthew Erler 

> In Drools 5 is it possible for a rule to call one of two specific rules
> depending on whether the condition in the first rule evaluates to true or
> false?  For example lets say that there are three rules: A, B, and C.  A is
> evaluated and if its condition is True then execute rule B, otherwise
> execute rule C.  B and C must not be executed on their own , but only by A.
> I haven't been able to find and examples or tutorials on this so if it's
> possible an example would be greatly appreciated.  Thank you.
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] DroolsCompilerAntTask task to build jBPM5 package

2011-08-22 Thread lhorton
I changed my script to use this:



instead of the separate pathelement entries and it worked fine.
my droolsPath includes all of the jars I listed in my last post (plus many
others)

--
View this message in context: 
http://drools.46999.n3.nabble.com/DroolsCompilerAntTask-task-to-build-jBPM5-package-tp3275567p3276357.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Ant Task to pre-compile xls spreadsheet

2011-08-22 Thread lhorton
There is a good example in the "Drools JBoss Rules 5.0 Developer's Guide"
chapter 11.

I just got this working for my own build, here is my xml, which is part of a
larger build script but at least will give you a sample:























Compiling rules spreadsheets to binary package file





--
View this message in context: 
http://drools.46999.n3.nabble.com/Ant-Task-to-pre-compile-xls-spreadsheet-tp3275067p3276304.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] DroolsCompilerAntTask task to build jBPM5 package

2011-08-22 Thread lhorton
that class is in drools-compiler-5.2.0.Final.jar

I set up my path using pathelement instead of fileset, and compile worked
with these jars (droolsPath is of course set for my own environment):
















--
View this message in context: 
http://drools.46999.n3.nabble.com/DroolsCompilerAntTask-task-to-build-jBPM5-package-tp3275567p3276295.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.2 method call in rhs

2011-08-22 Thread pamerida
This version: guvnor-5.2.0.Final-tomcat-6.0.war

--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-2-method-call-in-rhs-tp3275866p3276180.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.2 method call in rhs

2011-08-22 Thread pamerida
Yes, Im using Guvnor 5.2

--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-2-method-call-in-rhs-tp3275866p3276170.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Are if/then rules possible?

2011-08-22 Thread Matthew Erler
In Drools 5 is it possible for a rule to call one of two specific rules 
depending on whether the condition in the first rule evaluates to true or 
false?  For example lets say that there are three rules: A, B, and C.  A is 
evaluated and if its condition is True then execute rule B, otherwise execute 
rule C.  B and C must not be executed on their own , but only by A.  I haven't 
been able to find and examples or tutorials on this so if it's possible an 
example would be greatly appreciated.  Thank you.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor 5.2 method call in rhs

2011-08-22 Thread Michael Anstis
What version of Guvnor are you using?

Are you able to replicate with 5.2 (or later)?

On 22 August 2011 19:11, pamerida  wrote:

> Hi everyone, Im trying to call a method in the RHS but I cannot set the
> parameters that I want to send, here:
>
> http://drools.46999.n3.nabble.com/file/n3275866/method2.jpg
>
> when I clic the pencil icon it doesnt show me anything, any ideas why?, Ive
> tryied with FireFox and IE but it doesnt seems to work... thanks so much
> for
> your comments on this
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Guvnor-5-2-method-call-in-rhs-tp3275866p3275866.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Guvnor 5.2 calling methods from service..

2011-08-22 Thread pamerida
Hi everyone, Im trying to call a method of a service in the LHS Im using
Guvnor 5.2, but in the drop down menu I cant see all the methods declared on
the service...

http://drools.46999.n3.nabble.com/file/n3275884/method.jpg 

my service code is this


public class RulesSvcImpl implements RulesSvc {

protected Crud crud;
protected Finder finder;


public GlnNaviera findGlnNavieraByCodigoInterno(String pCodigo
) throws FinderException {
DetachedCriteria criteria =
DetachedCriteria.forClass(GlnNaviera.class);

if (StringUtils.isEmpty(pCodigo))
throw new FinderException("El Codigo Interno
ingresado esta vacio.");

criteria.add(Restrictions.eq("codigoInterno", pCodigo));
criteria.add(Restrictions.eq("estatus", "A"));

Collection result = finder.findByCriteria(criteria);
   

if (!result.isEmpty())
return (GlnNaviera) result.iterator().next();
return null;
}
   
public boolean existsGlnNaviera(String pCodigo) throws
FinderException {
if (findGlnNavieraByCodigoInterno(pCodigo) == null)
return false;
return true;
}
   
public Aduana findAduanaByGln(String pGln) throws FinderException {
DetachedCriteria criteria =
DetachedCriteria.forClass(Aduana.class);

if (StringUtils.isEmpty(pGln))
throw new FinderException("El Gln ingresado esta
vacio.");

criteria.add(Restrictions.eq("gln", pGln));
Collection result = finder.findByCriteria(criteria);

if (!result.isEmpty())
return (Aduana) result.iterator().next();
return null;
}
   
public Integer prueba() throws FinderException{
return 569;
}


/***setters and getters*/



As seen above there are four methods, and I only get to see one of them.. is
this because they have parameters??, how can I call this methods from the
LHS... thanks so much for your help.. 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-2-calling-methods-from-service-tp3275884p3275884.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Guvnor 5.2 method call in rhs

2011-08-22 Thread pamerida
Hi everyone, Im trying to call a method in the RHS but I cannot set the
parameters that I want to send, here:

http://drools.46999.n3.nabble.com/file/n3275866/method2.jpg 

when I clic the pencil icon it doesnt show me anything, any ideas why?, Ive
tryied with FireFox and IE but it doesnt seems to work... thanks so much for
your comments on this

--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-5-2-method-call-in-rhs-tp3275866p3275866.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Ant Task to pre-compile xls spreadsheet

2011-08-22 Thread qwertyqwerty
hi all

I am looking for a sample ant script which shows how an excel spreadsheet
can be precompiled and also the dependencies on the class path that are
required for it, can anyone poit me in the right direction?

Thanks,

--
View this message in context: 
http://drools.46999.n3.nabble.com/Ant-Task-to-pre-compile-xls-spreadsheet-tp3275067p3275067.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] To accumulate or not to accumulate

2011-08-22 Thread Bruno Freudensprung


Hi Wolfgang,

I finally decided to test different implementations:

   * first based on an accumulation function
   * second (your suggestion) relying on drools to 1) build all
 SentenceWindows then to 2) locate ManualAnnotations inside those
 Windows
   * third (your suggestion as well) relying on drools to 1) build only
 SentenceWindows that might be interesting (containing one of the
 ManualAnnotations I am looking for) then to 2) locate
 ManualAnnotations inside those Windows

First implementation performs quite well but I am stuck on the 
parametrization (I need to to define build2windows, build3windows, 
build4windows... functions): 47 milliseconds on 100 sentences, 94 ms 
sentences with 1000 sentences
Second implementations is of course sub optimal since it creates many 
useless windows: 125 ms on 100 sentences, 14400 ms on 1000 sentences
Third implementation is very versatile and its performances are 
comparable to the accumulator solution: 93 ms on 100 sentences, 125 ms 
on 1000 sentences


So thanks again for your suggestion; it was definitely useful :-).

Regards,

Bruno.

Le 19/08/2011 17:25, Wolfgang Laun a écrit :
2011/8/19 Bruno Freudensprung >



I am not sure I understand what you mean by "random order" but I
guess it has to do with my ArrayList result type.
What I had in mind is to put all sentences in a TreeSet during the
"action" method, and finally issue an ArrayList result object by
iterating over the TreeSet and grouping sentences.


Heh :) I clean forgot that I had done this sort of thing not too long ago.

My first guess was that such an accumulator might be faster than a
construction of windows using rules.
However I admit your suggestion is very elegant, and I thank you
for that! I am probably still too imperative-minded...


Well, a procedural solution would be a reasonable alternative for this 
problem.


-W


Regards,

Bruno.

Le 19/08/2011 16:05, Wolfgang Laun a écrit :

How would you write "buildwindows", given that its "action"
method would be called once for each Sentence, in random order?

It's very simple to write a very small set of rules to construct
all SentenceWindow facts of size 1 and then to extend them to any
desired size, depending on some parameter.
1. Given a Sentence and no Window beginning with it, create a
Window of length 1.
2. Given a Window of size n < desiredSize and given a Sentence
immediately following it, extend the Window to one of size n+1.
3a. For any Window of desiredSize, inspect it for "closely
situated ManualAnnotations".
3b. If ManualAnnotations have been associated with their
containing Sentences up-front, you just need to find Windows with
more than 1 ManualAnnotation, adding them in the RHS of rule 2 above.

-W


2011/8/19 Bruno Freudensprung mailto:bruno.freudenspr...@temis.com>>


Hi Wolfgang,

Thanks for your answer.
Sentences are not contiguous (might be some space characters
in between) but manual annotations cannot overlap sentences
(interpret "overlap" in terms of Drools Fusion terminology).
If I had an "inside" operator, do you think the following
accumulate option could be better?

when
*$result : ArrayList() from accumulate ( $s: Sentence(),
buildwindows($s))*
*$w : SentenceWindows () **from $result*
a1 : ManualAnnotation (this *inside *$w)
a2 : ManualAnnotation (this != a1, this *inside *$w)
then
... do something with a1 and a2 since they are "close" to
each other
end

Does anyone know something about accumulator parametrization
(looking at the source code it does not seem to be possible,
though)?
Maybe a syntax inspired of operator parametrization could be
nice:

$result : ArrayList() from accumulate ( $s: Sentence(),
*buildwindows[3]($s)*)

Best regards,

Bruno.

Le 19/08/2011 13:55, Wolfgang Laun a écrit :

There are some details that one should consider before
deciding on a particular implementation technique.

* Are all Sentences contiguous, i.e., s1.end = pred(
  s2.start )
* Can a ManualAnnotation start on one Sentence and end
  in the next or any further successor?

As in all problems where constraints depend on an order
between facts, performance is going to be a problem with
increasing numbers of Sentences and ManualAnnotations.

Your accumulate plan could be a very inefficient approach.
Creating O(N*N) pairs and then looking for an overlapping
window is much worse than looking at each window, for
instance. But it depends on the expected numbers for both.

-W



2011/8/19 Bruno Freudenspr

Re: [rules-users] Using JBPM 5 with Container Managed Persistence

2011-08-22 Thread Marco Rietveld
Hi Hough, 

Unfortunately, there isn't any documentation on this (Container Managed
Persistence w/ jBPM 5) that I know of. I've asked around a little and
couldn't find any. 

What are you using transactions for in your case? jBPM itself has some
mechanisms that manage transactions. 

Regards, 
Marco


houghvw wrote:
> 
> Hi,
> 
> Is there any documentation on how to configure JBPM 5 with container
> managed persistence using EJB3. It works using bean managed persistence.
> But would make life much easier if I did not have to manage the tx myself.
> 
> Regards
> Hough
> 


--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-JBPM-5-with-Container-Managed-Persistence-tp3261549p3274929.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Iterative diagnosis - how to determine what is the next best fact?

2011-08-22 Thread Kal
Thank you for the reply Wolfgang!

Altho this particular application involves a Expert System, I quite enjoyed
learning about drools and I intend to keep studying it in the following
months regardless if I end up using it or not right now.

A solution (far from ideal) that I came up with was to 'explode' my rules,
something like this:

/Group A:
RULE: if ~A, solution is: "text here 1"
RULE: if A => ask B1

Group B: 
RULE: if A,~B1 => ask C1
RULE: if A, B1 => ask B2
RULE: if A, B1, B2 => ask B3
RULE: if A, B1, ~B2 => solution is: "text here 2"
RULE: if A, B1, B2, B3 ou ~B3 => ask B4
RULE: if A, B1, B2, B3, B4 => solution is: "text here 3"
RULE: if A, B1, B2, B3, ~B4 => solution is: "text here 4"
RULE: if A, B1, B2, ~B3, B4 => solution is: "text here 5"
RULE: if A, B1, B2, ~B3, ~B4 =>  solution is: "text here 6"

Group C:
RULE: if A, ~C1 => ask D1


Groups D, E, F, G, .../

But that would means that a small sample with ~25 rules would have to be
'exploded' into ~50+ rules. The ASK command would represent a call to the
end user and it would be followed by a new Fact and fireRules.

Please note that a small sample with 25 rules has about 15 variables/facts
and altho I have one general goal: "is it a problem or not?", there are
about 17 unique answers (e.g: yes it is a problem, so do this to solve
it). 

With that in mind, I think that using a rules system like drools would be
perfect to keep my application simple to maintain and to expand later ... a
complete solution would involve more goals, maybe 200-300 rules.

Any suggestions on how to use Drools or other solution would be greatly
appreciated.

Thanks!

Kal


--
View this message in context: 
http://drools.46999.n3.nabble.com/Iterative-diagnosis-how-to-determine-what-is-the-next-best-fact-tp3271709p3274844.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Fw: Guvnor Sample Rule

2011-08-22 Thread Sumeet Karawal

Hi

For this I saved the schema (change-set-1.0.0.xsd) on my local machine and
gave the path in the ChangeSet.xml

Now its working fine...

Regards,
Sumeet Karawal
Mailto: sumeet.kara...@tcs.com

- Forwarded by Sumeet Karawal/MUM/TCS on 08/22/2011 03:44 PM -

  
  From:   Sumeet Karawal
  

  
  To: rules-users@lists.jboss.org   
  

  
  Date:   08/18/2011 06:24 PM   
  

  
  Subject:[rules-users] Guvnor Sample Rule  
  

  
  Sent by:rules-users-boun...@lists.jboss.org   
  

  







Hi,

I am trying to create rule in Guvnor and runnig it in Java Application on
Eclipse.

I have gone through the mortgages example provided in the distribution. I
am not sure that I am doing it correctly The steps I did are as follows :

1) Uploaded a POJO jar in Guvnor
2) Created a rule for checking the value of POJO data member
3) Built the package
4) Downloaded the ChangeSet.xml provided
5) Imported that ChangeSet.xml in Eclipse project under com.test package.
6) Created KnowledgeBase and fired the rules

My POJO :

package com.test;

public class CardHolder {

 private int accno;
 private double discount;
 public int getAccno() {
 return accno;
 }
 public void setAccno(int accno) {
 this.accno = accno;
 }
 public double getDiscount() {
 return discount;
 }
 public void setDiscount(double discount) {
 this.discount = discount;
 }
}



My Rule Running Class :

package com.test;

import org.drools.KnowledgeBase;
import org.drools.agent.KnowledgeAgent;
import org.drools.agent.KnowledgeAgentFactory;
import org.drools.io.Resource;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;

public class Discount_Provider {

 public static void main(String[] args) {

 CardHolder c1 = new CardHolder();
 c1.setAccno(1005);

 try{
 KnowledgeBase kbase  = readKnowledgeBase();
 StatefulKnowledgeSession ksession =
kbase.newStatefulKnowledgeSession();

 ksession.insert(c1);
 ksession.fireAllRules();


 System.out.println("The discount applied is  : 
"+
c1.getDiscount());
}
 catch (Exception ex)
 {
 System.out.println("Exception 
is  :
"+ex);
 }
  }

 private static KnowledgeBase readKnowledgeBase()
 {
  KnowledgeAgent kagent =
KnowledgeAgentFactory.newKnowledgeAgent
("DiscAgent");
  Resource changeset = ResourceFactory.newClassPathResource
("com/test/ChangeSet.xml");
  kagent.applyChangeSet(changeset);
  KnowledgeBase kbase = kagent.getKnowledgeBase();
  kagent.dispose();
  return kbase;
 }
}


My Rule Content :

1.|rule "Discount_CardHolder"
2.|dialect "mvel"
3.|when
4.|$c : CardHolder( accno > 1001 )
5.|then
6.|$c.setDiscount( 10 );
7.|update( $c );
8.|end




Link from where I download the ChangeSet from Guvnor :

Change Set:
|>

|
http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/TestPackage/LATEST/Cha

Re: [rules-users] Iterative diagnosis - how to determine what is the next best fact?

2011-08-22 Thread Wolfgang Laun
As an answer to your "big" question: no. There is no distinction between a
rule that isn't activated because one of its patterns doesn't match with any
of the existing facts or due to the absence of facts of a type. Hence, (A, B
and not C) with A, B and C that does not match is indistinguishable from A,
B and no C at all.

Are all your facts booleans or simple (integer, enum,...) values? "Answer to
question" seems to indicate this.

Note that there are rules (boolean expressions) determining a "solutiion"
and rules governing data acquisition. I'd try and model the second group,
possibly based on facts representing the individual "solution", what is
required to reach them, how much has been required, whether one is still
feasible, etc.

"Decision tree" seems to be the thing you need, but Drools doesn't have this
out of the box.

-W


On 21 August 2011 00:23, Kal  wrote:

> Hi,
>
> I am new to Drools. I read the documentation and I looked at the examples,
> but I still not sure how to solve this problem:
>
> 1) Kind: iterative diagnosis
>
> Rules:
> if (A, B and C) then print ("Solution 1")
> if (A, B and not C) then print ("Solution 2")
> if (A, D and E) then print ("Solution 3")
> and so on...
>
> The entry should be something like this:
> * no facts are know
> * user answers a question (lets say A = true), I update the Statefull
> session and fire the rules
> * system chooses a unknow fact based on condition for the best incomplete
> rule. In this case, it would be B (as it knows A, but it doesn't know B or
> C)
> * user answers a new question (B = false), I update the session + fireRules
> * system now knows that rule 1 (A, B and C) is not possible. It also knows
> that rule 2 (A, B and not C) is not possible. So, it chooses the second
> condition on rule 3 (A, D and E), which is: what is D?
> * user answers a new question (D = true)
> 
> * user answers a new question (E= true)
> * system prints: Solution 3!
>
>
> My big question: can I extract from the working memory or rule manager or
> the agenda a list of the rules that are 'almost' good to fire, but that
> still requires some of its conditions to be know (by inserting facts)?
>
> Thanks!
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Iterative-diagnosis-how-to-determine-what-is-the-next-best-fact-tp3271709p3271709.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users