Re: [rules-users] Test Scenarios with Rule Flows in 5.1.1 Guvnor

2011-03-31 Thread Mauricio Salatino
The question is, when are you firing all the rules(activations)? In other
words, when are you calling the fireAllRules() method?
Greetings.

On Thu, Mar 31, 2011 at 2:42 AM, kylin8627live kylin8...@live.com wrote:

 Hi Jeff,

 I met the same problem. I added the rule you mention to Guvnor and it is
 able to triggered nodes in my ruleflow. However, still no rules were fired.
 I guess rules are not assigned to ruleflow-groups because it mentions
 [size=0].
 In rules I set up ruleflow-group properties and they work fine in Eclipse.
 Am I missing something?

 Following is a part of audit log


 FIRING rule: [StartProcess] activationId:StartProcess [0] declarations:
  BEFORE RULEFLOW STARTED process:flow[id=eLearningWF]
  BEFORE RULEFLOW NODE TRIGGERED node:Start[id=1]
 process:flow[id=eLearningWF]
  null process:flow[id=eLearningWF]
  BEFORE RULEFLOW NODE TRIGGERED node:CorrectInitQuestion[id=2]
 process:flow[id=eLearningWF]
  BEFORE RULEFLOW GROUP ACTIVATED group:CorrectInitQuestion[size=0]
  AFTER RULEFLOW GROUP ACTIVATED group:CorrectInitQuestion[size=0]
  AFTER RULEFLOW NODE TRIGGERED node:CorrectInitQuestion[id=2]
 process:flow[id=eLearningWF]
  null process:flow[id=eLearningWF]
  AFTER RULEFLOW NODE TRIGGERED node:Start[id=1]
 process:flow[id=eLearningWF]
  AFTER RULEFLOW STARTED process:flow[id=eLearningWF]
  BEFORE RULEFLOW GROUP DEACTIVATED group:CorrectInitQuestion[size=0]
  AFTER RULEFLOW GROUP DEACTIVATED group:CorrectInitQuestion[size=0]
  null process:flow[id=eLearningWF]
  BEFORE RULEFLOW NODE TRIGGERED node:WrongInitQuestion[id=14]
 process:flow[id=eLearningWF]
  BEFORE RULEFLOW GROUP ACTIVATED group:WrongInitQuestion[size=0]
  AFTER RULEFLOW GROUP ACTIVATED group:WrongInitQuestion[size=0]
  AFTER RULEFLOW NODE TRIGGERED node:WrongInitQuestion[id=14]
 process:flow[id=eLearningWF]
  null process:flow[id=eLearningWF]
  BEFORE RULEFLOW GROUP DEACTIVATED group:WrongInitQuestion[size=0]
  AFTER RULEFLOW GROUP DEACTIVATED group:WrongInitQuestion[size=0]
  null process:flow[id=eLearningWF]

 Does null process:flow[id=eLearningWF] indicate anything?

 Really appreciated if someone can provide some helps.

 Best,
 Weilin

 --
 View this message in context:
 http://drools-java-rules-engine.46999.n3.nabble.com/Test-Scenarios-with-Rule-Flows-in-5-1-1-Guvnor-tp2754820p2757301.html
 Sent from the Drools - User mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users




-- 
 - CTO @ http://www.plugtree.com
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar

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


Re: [rules-users] Test Scenarios with Rule Flows in 5.1.1 Guvnor

2011-03-31 Thread Jeffrey DeLong
I know you said this is only part of the audit log but I don't see any facts 
inserted or rules being activated. The fact insertion statements should appear 
before the StartProcess rule is activated. Can you paste the entire audit log 
for running the test scenario?


On Mar 30, 2011, at 11:42 PM, kylin8627live wrote:

 Hi Jeff,
 
 I met the same problem. I added the rule you mention to Guvnor and it is
 able to triggered nodes in my ruleflow. However, still no rules were fired.
 I guess rules are not assigned to ruleflow-groups because it mentions
 [size=0].
 In rules I set up ruleflow-group properties and they work fine in Eclipse.
 Am I missing something?
 
 Following is a part of audit log
 
 
 FIRING rule: [StartProcess] activationId:StartProcess [0] declarations:  
 BEFORE RULEFLOW STARTED process:flow[id=eLearningWF]
 BEFORE RULEFLOW NODE TRIGGERED node:Start[id=1]
 process:flow[id=eLearningWF]
 null process:flow[id=eLearningWF]
 BEFORE RULEFLOW NODE TRIGGERED node:CorrectInitQuestion[id=2]
 process:flow[id=eLearningWF]
 BEFORE RULEFLOW GROUP ACTIVATED group:CorrectInitQuestion[size=0]
 AFTER RULEFLOW GROUP ACTIVATED group:CorrectInitQuestion[size=0]
 AFTER RULEFLOW NODE TRIGGERED node:CorrectInitQuestion[id=2]
 process:flow[id=eLearningWF]
 null process:flow[id=eLearningWF]
 AFTER RULEFLOW NODE TRIGGERED node:Start[id=1] process:flow[id=eLearningWF]
 AFTER RULEFLOW STARTED process:flow[id=eLearningWF]
 BEFORE RULEFLOW GROUP DEACTIVATED group:CorrectInitQuestion[size=0]
 AFTER RULEFLOW GROUP DEACTIVATED group:CorrectInitQuestion[size=0]
 null process:flow[id=eLearningWF]
 BEFORE RULEFLOW NODE TRIGGERED node:WrongInitQuestion[id=14]
 process:flow[id=eLearningWF]
 BEFORE RULEFLOW GROUP ACTIVATED group:WrongInitQuestion[size=0]
 AFTER RULEFLOW GROUP ACTIVATED group:WrongInitQuestion[size=0]
 AFTER RULEFLOW NODE TRIGGERED node:WrongInitQuestion[id=14]
 process:flow[id=eLearningWF]
 null process:flow[id=eLearningWF]
 BEFORE RULEFLOW GROUP DEACTIVATED group:WrongInitQuestion[size=0]
 AFTER RULEFLOW GROUP DEACTIVATED group:WrongInitQuestion[size=0]
 null process:flow[id=eLearningWF]
 
 Does null process:flow[id=eLearningWF] indicate anything?
 
 Really appreciated if someone can provide some helps.
 
 Best,
 Weilin 
 
 --
 View this message in context: 
 http://drools-java-rules-engine.46999.n3.nabble.com/Test-Scenarios-with-Rule-Flows-in-5-1-1-Guvnor-tp2754820p2757301.html
 Sent from the Drools - User 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


Re: [rules-users] Test Scenarios with Rule Flows in 5.1.1 Guvnor

2011-03-31 Thread kylin8627live
This morning I tested it, it works fine. My startProcess rule like this.

rule StartProcess
salience 100
when
eval(true);
then 
#kcontext.getKnowledgeRuntime().startProcess(ProcessName);
drools.getWorkingMemory().startProcess(ProcessName);
drools.getWorkingMemory().fireAllRules();

end

Then all rules are assigned to each workflow-group.
Thanks everyone for providing me help!

Weilin

--
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Test-Scenarios-with-Rule-Flows-in-5-1-1-Guvnor-tp2754820p2759724.html
Sent from the Drools - User 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] Test Scenarios with Rule Flows in 5.1.1 Guvnor

2011-03-30 Thread John Peterson
Hi all,

I had (hopefully) a quick question about trying to test rules in rule flows in 
Guvnor with Drools 5.1.1.  I have a simple 4 step rule flow 
(Start-RuleGroup1-RuleGroup2-End) with 1 rule in each Rule group.  When I set 
up the test scenario to fire the first rule, which will trigger the second 
rule, activate RuleGroup1, and run the scenario, it doesn't trigger the 
RuleFlow and fire the rule.  I've also tried activating Start instead, but 
neither of them trigger the RuleFlow.

I know from experience that Rule Flows don't seem to work with 5.0, but with 
the addition of the entry options, I thought they would with 5.1.1.  Am I 
mistaken?

Also, when I look at the Audit Log, I see the Rule Flow activated and 
deactivated before any of the facts are asserted:


BEFORE RULEFLOW GROUP ACTIVATED group:Start[size=0]


AFTER RULEFLOW GROUP ACTIVATED group:Start[size=0]


BEFORE RULEFLOW GROUP DEACTIVATED group:Start[size=0]


AFTER RULEFLOW GROUP DEACTIVATED group:Start[size=0]


OBJECT ASSERTED value:com.test.Game@47244724 factId: 1


OBJECT ASSERTED value:com.test.Customer@4c584c58 factId: 2




Could this be part of the problem?

Thanks!

inline: Picture (Device Independent Bitmap) 1.jpginline: Picture (Device Independent Bitmap) 2.jpginline: Picture (Device Independent Bitmap) 3.jpginline: Picture (Device Independent Bitmap) 4.jpginline: Picture (Device Independent Bitmap) 5.jpginline: Picture (Device Independent Bitmap) 6.jpg___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Test Scenarios with Rule Flows in 5.1.1 Guvnor

2011-03-30 Thread Jeffrey DeLong
Add a rule with a higher salience that starts the rule flow process

rule StartProcess
salience 100
when
#conditions
then 
#actions
kcontext.getKnowledgeRuntime().startProcess(processname);

end

And add it to your package.

Activate is for test scenarios that test individual rules that are part of a 
ruleflow group. For example, you want to test your second rule independent of 
the rule flow process, then activate RuleFlowGroup2 (and provide a set of facts 
that cause the rule in RuleFlowGroup2 to execute).

Jeff

On Mar 30, 2011, at 11:53 AM, John Peterson wrote:

 Hi all,
  
 I had (hopefully) a quick question about trying to test rules in rule flows 
 in Guvnor with Drools 5.1.1.  I have a simple 4 step rule flow 
 (Start-RuleGroup1-RuleGroup2-End) with 1 rule in each Rule group.  When I set 
 up the test scenario to fire the first rule, which will trigger the second 
 rule, activate “RuleGroup1”, and run the scenario, it doesn’t trigger the 
 RuleFlow and fire the rule.  I’ve also tried activating “Start” instead, but 
 neither of them trigger the RuleFlow.
  
 I know from experience that Rule Flows don’t seem to work with 5.0, but with 
 the addition of the entry options, I thought they would with 5.1.1.  Am I 
 mistaken?
  
 Also, when I look at the Audit Log, I see the Rule Flow activated and 
 deactivated before any of the facts are asserted:
  
 Picture (Device Independent Bitmap) 1.jpg   BEFORE RULEFLOW GROUP ACTIVATED 
 group:Start[size=0]
 Picture (Device Independent Bitmap) 2.jpg   AFTER RULEFLOW GROUP ACTIVATED 
 group:Start[size=0]
 Picture (Device Independent Bitmap) 3.jpg   BEFORE RULEFLOW GROUP 
 DEACTIVATED group:Start[size=0]
 Picture (Device Independent Bitmap) 4.jpg   AFTER RULEFLOW GROUP 
 DEACTIVATED group:Start[size=0]
 Picture (Device Independent Bitmap) 5.jpg   OBJECT ASSERTED 
 value:com.test.Game@47244724 factId: 1
 Picture (Device Independent Bitmap) 6.jpg   OBJECT ASSERTED 
 value:com.test.Customer@4c584c58 factId: 2
  
  
 Could this be part of the problem?
  
 Thanks!
  
 ___
 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] Test Scenarios with Rule Flows in 5.1.1 Guvnor

2011-03-30 Thread kylin8627live
Hi Jeff,

I met the same problem. I added the rule you mention to Guvnor and it is
able to triggered nodes in my ruleflow. However, still no rules were fired.
I guess rules are not assigned to ruleflow-groups because it mentions
[size=0].
In rules I set up ruleflow-group properties and they work fine in Eclipse.
Am I missing something?

Following is a part of audit log


FIRING rule: [StartProcess] activationId:StartProcess [0] declarations:  
 BEFORE RULEFLOW STARTED process:flow[id=eLearningWF]
 BEFORE RULEFLOW NODE TRIGGERED node:Start[id=1]
process:flow[id=eLearningWF]
 null process:flow[id=eLearningWF]
 BEFORE RULEFLOW NODE TRIGGERED node:CorrectInitQuestion[id=2]
process:flow[id=eLearningWF]
 BEFORE RULEFLOW GROUP ACTIVATED group:CorrectInitQuestion[size=0]
 AFTER RULEFLOW GROUP ACTIVATED group:CorrectInitQuestion[size=0]
 AFTER RULEFLOW NODE TRIGGERED node:CorrectInitQuestion[id=2]
process:flow[id=eLearningWF]
 null process:flow[id=eLearningWF]
 AFTER RULEFLOW NODE TRIGGERED node:Start[id=1] process:flow[id=eLearningWF]
 AFTER RULEFLOW STARTED process:flow[id=eLearningWF]
 BEFORE RULEFLOW GROUP DEACTIVATED group:CorrectInitQuestion[size=0]
 AFTER RULEFLOW GROUP DEACTIVATED group:CorrectInitQuestion[size=0]
 null process:flow[id=eLearningWF]
 BEFORE RULEFLOW NODE TRIGGERED node:WrongInitQuestion[id=14]
process:flow[id=eLearningWF]
 BEFORE RULEFLOW GROUP ACTIVATED group:WrongInitQuestion[size=0]
 AFTER RULEFLOW GROUP ACTIVATED group:WrongInitQuestion[size=0]
 AFTER RULEFLOW NODE TRIGGERED node:WrongInitQuestion[id=14]
process:flow[id=eLearningWF]
 null process:flow[id=eLearningWF]
 BEFORE RULEFLOW GROUP DEACTIVATED group:WrongInitQuestion[size=0]
 AFTER RULEFLOW GROUP DEACTIVATED group:WrongInitQuestion[size=0]
 null process:flow[id=eLearningWF]

Does null process:flow[id=eLearningWF] indicate anything?
 
Really appreciated if someone can provide some helps.

Best,
Weilin 

--
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Test-Scenarios-with-Rule-Flows-in-5-1-1-Guvnor-tp2754820p2757301.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users