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-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] Drools flow and BPEL (Drools 5.1)

2010-09-16 Thread Jeffrey DeLong
Actually there is another community project in JBoss,  Riftsaw, that 
incorporates ODE into a JBoss AS environment. It is hard to say which process 
execution language best matches your requirements. That would depend on the 
degree of Web service orchestration in your architecture. If your business 
processes are 100% composed of Web services, then BPEL is probably the best 
process execution language, and you should take a look at Riftsaw. If your 
processes involve a lot of human integration or tight integration with rules, 
then BPMN2 process execution language and Drools Flow is the better way to go.

Jeff

On Sep 16, 2010, at 8:50 AM, Mark Proctor wrote:

  On 16/09/2010 03:29, tim wrote:
 Do you mean that there isn't embedded BPEL (i.e Apache ODE) in Drools 5.1?If
 that's true, I'll have to find other ways to support BPEL in our product.
 
 I find there is a guvnor-BPEL-editor component in Drools 5.1.1 source code.
 Are you planning to provide a BPEL editor in Guvnor? And in which release?
 We have no plans at the moment to embed BPEL into Drools. BPMN2 is far 
 supperior to BPEL and that is were our focus is.
 
 Mark
 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] Ruleflows

2008-04-10 Thread Jeffrey Delong

Why not try the second strategy you listed below:

- (Insert one debt, start the ruleflow process) for each debt

Since each debt is separate.

As for only firing one rule in the ruleflow group, try using the same 
activation-group attribute on each rule in the ruleflow group. 
Activation groups cause only a single rule in the same group to be 
activated.


Jeff

Jonathan Guéhenneux wrote:

I just constated its true. sadly (for me).
How can I do to make that only one rule per ruleflow group can be 
activated with one specific tuple?


I think that I can add an attribute in my business object, like 
boolean gravityComputed in order to activate only one time a gravity 
compute rule but thats not very clean. Is there any drools action to 
break the deactivate the current flow and activate the next one? and 
if yes, is it possible to call it from a rule?


Subject: RE: [rules-users] Ruleflows
Date: Thu, 10 Apr 2008 11:45:51 +0100
From: [EMAIL PROTECTED]
To: rules-users@lists.jboss.org

IMO, the first.
 
Another answer; I believe RuleFlow controls the activation

sequence so IMO yes. Kris, care to correct me?

*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] *On Behalf Of
*Jonathan Guéhenneux
*Sent:* 10 April 2008 11:36
*To:* Rules Users List
*Subject:* [rules-users] Ruleflows

Hi,

I have to compute the gravity of a debt according to a set of
rules organized in a ruleflow. I will have to process about
ten thousands debts every minute.
There is no dependency between the debts. All the rules are
applied to one debt.

What is the best strategy?

- Insert all the debts, and start the ruleflow process
 or
- (Insert one debt, start the ruleflow process) for each debt

Another question:

If a rule r1 in the ruleflow group rfg1 is fired on a debt
d1, can a second rule r2 in the same ruleflow group be
fired on the same debt d1?

Discutez gratuitement avec vos amis en vidéo ! Téléchargez
Messenger, c'est gratuit ! http://www.windowslive.fr/messenger/ 



Plus de 15 millions de français utilisent Windows Live Messenger ! 
Téléchargez Messenger, c'est gratuit ! 
http://www.windowslive.fr/messenger/



___
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] Closing connections with BRMS\JackRabbit Repository

2008-02-22 Thread Jeffrey Delong
Why use an XA datasource? It would not seem that the BRMS would be 
involved in global transactions with multiple participants. Perhaps you 
could try a local tx datasource and see if you still get the warning. 
The exception is logged at INFO; typically it is not a problem, since 
the app server will close the connection. I seem to remember there is 
even a setting on the datasource to suppress the warning message. Not 
sure why execution would stop for 4-5 seconds though.


mmquelo massi wrote:
 
Hi guys!
 
I have got JBoss 4.2.2, DROOLS BRMS 4.0.4 and Oracle 10g XE as RDBMS.
 
I defined an Oracle XA Datasource Drools Repository as follows:
 
/xa-datasource

 jndi-namejdbc_XA/Drools_Rep/jndi-name
track-connection-by-tx/
isSameRM-override-valuefalse/isSameRM-override-value

xa-datasource-classoracle.jdbc.xa.client.OracleXADataSource/xa-datasource-class
xa-datasource-property 
name=URLjdbc:oracle:thin:@//localhost:1521/xe/xa-datasource-property

xa-datasource-property name=User.../xa-datasource-property
xa-datasource-property name=Password.../xa-datasource-property

exception-sorter-class-nameorg.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter/exception-sorter-class-name
   
   !-- 
prepared-statement-cache-size0/prepared-statement-cache-size --

   !-- blocking-timeout-millis100/blocking-timeout-millis --
   !-- min-pool-size2/min-pool-size --
   !-- max-pool-size30/max-pool-size --/
/
   
valid-connection-checker-class-nameorg.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker/valid-connection-checker-class-name/

/no-tx-separate-pools/
  metadata
 type-mappingOracle9i/type-mapping
  /metadata
 use-java-contextfalse/use-java-context 
/xa-datasource/
 
This repository is managed with JackRabbit.
 
So i defined the repository.xml telling jackrabbit that I want

to persist the rules into the Oracle XA Datasource I previously defined:
 
/PersistenceManager 
class=org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager

 param name=dataSourceLocation value=jdbc_XA/Drools_Rep/
 param name=schema value=oracle/
 param name=schemaObjectPrefix value=${wsp.name 
http://wsp.name}_/
 param name=externalBLOBs value=false /  
/PersistenceManager/
 
The problem comes out each time I reload the rulebase from

the BRMSeach time the RuleAgent wants to load
a rulebase (from the XA datasource ) the following exception is
thrown and the execution stops for 4-5 seconds:
 

/12:29:36,170 INFO [CachedConnectionManager] Closing a connection for 
you. Please close them yourself: 
[EMAIL PROTECTED]/


/java.lang.Throwable: STACKTRACE/

/at 
org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(/


/CachedConnectionManager.java:290/ /)/

/at 
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(/


/BaseConnectionManager2.java:417/ /)/

/at 
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(/


/BaseConnectionManager2.java:842/ /)/

/at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(/

/WrapperDataSource.java:88/ /)/

/at 
org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager.getConnection(/


/JNDIDatabasePersistenceManager.java:77/ /)/

/at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.initConnection(/


/DatabasePersistenceManager.java:730/ /)/

/at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.reestablishConnection(/


/DatabasePersistenceManager.java:806/ /)/

/at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.executeStmt(/


/DatabasePersistenceManager.java:852/ /)/

/at 
org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.exists(/


/DatabasePersistenceManager.java:673/ /)/

/at 
org.apache.jackrabbit.core.state.SharedItemStateManager.hasNonVirtualItemState(/


/SharedItemStateManager.java:1104/ /)/

/at org.apache.jackrabbit.core.state.SharedItemStateManager.hasItemState(/

/SharedItemStateManager.java:289/ /)/

/at org.apache.jackrabbit.core.state.LocalItemStateManager.hasItemState(/

/LocalItemStateManager.java:180/ /)/

/at org.apache.jackrabbit.core.state.XAItemStateManager.hasItemState(/

/XAItemStateManager.java:252/ /)/

/at 
org.apache.jackrabbit.core.state.SessionItemStateManager.hasItemState(/


/SessionItemStateManager.java:199/ /)/

/at org.apache.jackrabbit.core.ItemManager.itemExists(/

/ItemManager.java:258/ /)/

/at org.apache.jackrabbit.core.NodeImpl.hasProperty(/

/NodeImpl.java:2708/ /)/

/at org.drools.repository.PackageItem.getCompiledPackageBytes(/

/PackageItem.java:666/ /)/

/at org.drools.brms.server.files.FileManagerUtils.loadBinaryPackage(/

/FileManagerUtils.java:146/ /)/

/at sun.reflect.NativeMethodAccessorImpl.invoke0(/

/Native Method/ /)/

/at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)/

/at 

Re: [rules-users] If one exists check all

2007-09-19 Thread Jeffrey Delong
I think what you are looking for is the forall. The forall Conditional 
Element will evaluate to true when all facts that match the first 
pattern match all the remaining patterns. E.g.,,



rule No fields can be blank
when
forall ($i : Insurance( name != null || street != null || city != null ||
county != null || state != null || country != null ||
zip != null)
Insurance(this == $i, name == null || street == null || city == null ||
county == null || state == null || country == null ||
zip == null) )
then
Report error
end


Brian Enderle wrote:
I have a test case that says that if any one field is present then all must be 
present and then verified.  The items in question are for an Insurance object 
and are Name, Street, City, County, State, Country and Zip.  If one of the 
these 7 fields is present (not null/blank) then it and all the other fields 
need to be verified.  This needs to be done on a per object basis as not all 
InsuranceCarrier objects will have these fields filled in.


Just to clarify I need rules for each field similar to the following:

rule Name cannot be blank
   when
  $i : Insurance( name == null, street != null || city != null || 
  county != null || state != null || country != null || 
  zip != null)

   then
  Report error
end

Ithere a simple way to check all the values and then execute all the rules for 
that object?  


THanks in advance,
Brian Enderle

___
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] Ruleflow and Global - precision

2007-08-30 Thread Jeffrey Delong
Did you put a global declaration in the XOR Split Constraint Editor 
(same spot to put imports)?


vdelbart wrote:

Just an additionnal information of my problem :

this two sentences work in a rule with the declaration of my global (Global
HashMap map) :

Boolean(eval((Boolean)map.get(decision) == true)) from Boolean.TRUE;
Boolean(booleanValue == false) from map.get(decision)



thanks,
  


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