Re: [rules-users] [Drools Planner] Hard constraint appears to be ignored - How to isolate a working memory corruption in drools expert
Great work Reinis! -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-Hard-constraint-appears-to-be-ignored-tp3777209p3812319.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] [Drools Planner] Hard constraint appears to be ignored - How to isolate a working memory corruption in drools expert
Can't reproduce the described effect with 5.3.0.Final, will look at 5.4.0.Beta2 later today. As far as I can see, the test case asserts the correct result which Drools produces anyway? -W On 09/03/2012, ge0ffrey ge0ffrey.s...@gmail.com wrote: Great work Reinis! -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-Hard-constraint-appears-to-be-ignored-tp3777209p3812319.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
Re: [rules-users] Ruleflow stops after 1st rule task when using changeset
The change-set XSD can be found in knowledge-api jar. Although most existing change-sets point to an equivalent version in svn. On 8 March 2012 14:46, drdaveg drda...@gmail.com wrote: I have a working prototype that is being converted from programmatic loading to the change-set/knowledge agent paradigm. I am experiencing several problems that are shown in this minimal version. First, like in many posts the XSD for change-set is not found; where is the actual XSD? This issue does not stop running so issue two: the ruleflow stops running after the first rule task (I have placed script tasks around it to show this.) With change-set is there an additional mechanism needed to change ruleflow-group's? I attached an archive of the minimal files if this requires a JIRA. http://drools.46999.n3.nabble.com/file/n3809834/toPostToDroolsListChangeSets.zip toPostToDroolsListChangeSets.zip -- View this message in context: http://drools.46999.n3.nabble.com/Ruleflow-stops-after-1st-rule-task-when-using-changeset-tp3809834p3809834.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
Re: [rules-users] Anyone know any reason not to replace mvel2-drools4 with mvel2-beta6 jars in Drools 5.3.0.Final?
ndipiazza wrote Related to posts: http://drools.46999.n3.nabble.com/Drools-5-2-performance-building-KnowledgeBase-tc3239746.html#a3284343 http://drools.46999.n3.nabble.com/time-loading-rules-into-knowledgebase-giving-different-results-when-using-mvel2-beta6-versus-mvel2-ds-tc3733481.html In Drools 5.3.0.Final, I noticed that when loading rules package, there seems to be a big time and memory gain between mvel2-beta6 jar versus mvel2-drools4 jars. Has anyone seen or know of any problems with using the mvel2-beta6 jars that we might encounter? The mvel 2.1 beta's are actually older then most of the mvel 2.1 drools releases. Check nexus timestamps. The versions are indeed not maven/osgi conflict resolution compatible (they are not alfabatically comparable ordered), but as long as mvel doesn't release 2.1.0.Final there's little we can do. -- View this message in context: http://drools.46999.n3.nabble.com/Anyone-know-any-reason-not-to-replace-mvel2-drools4-with-mvel2-beta6-jars-in-Drools-5-3-0-Final-tp3803795p3812544.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] [Drools Planner] Hard constraint appears to be ignored - How to isolate a working memory corruption in drools expert
Works also with 5.4.0.Beta2. Does this really fail in the context of Drools' unit tests? -W On 9 March 2012 12:23, Wolfgang Laun wolfgang.l...@gmail.com wrote: Can't reproduce the described effect with 5.3.0.Final, will look at 5.4.0.Beta2 later today. As far as I can see, the test case asserts the correct result which Drools produces anyway? -W On 09/03/2012, ge0ffrey ge0ffrey.s...@gmail.com wrote: Great work Reinis! -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-Hard-constraint-appears-to-be-ignored-tp3777209p3812319.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] Drools Salience and no-loop
So I have setup my drools execution as follows: 1.A single thread is pooling Orders from the db and insert them into X number of sessions(10) running on separate threads(fireUntilHalt()). 2. I have a set up rules which need to execute first to allow other rules to fire so I have rules such as: rule main 1 salience 1000 no-loop true when some_conditions then modify order info(update is invoked) end 3. There is another set of rules which then check the Order for these preconditions along with others rule sub 1 salience 100 no-loop true when some_conditions main 1 consequences present then modify order info(no update invoked as other rules in the session don't care) end 4. I then have a single rule which has a low salience and should be last rule to fire in the activation which retracts the Order and hands it to a service for post processsing rule END salience -100 no-loop true when ord:Order then retract(ord); invokeService(ord); end The problem I am having is that my END rule is being invoked on certain Orders in working memory before the other activation have taken any affect(I have verified this by send a replicated order 1000 times and each time a large majority his the service before anything was modified on the order). Am I missing something? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812723.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] Persistence in fireUntilHalt() loop
Any info on the subject? Does anyone suffers the same problem? Anyone doing persistence on a fireUnitHalt loop? Alberto R. Galdo arga...@gmail.com On Thu, Mar 8, 2012 at 11:32, Alberto R. Galdo arga...@gmail.com wrote: Hi, We're running an application that uses Drools + JBPM 5 + Drools integration our set-up can be seen as: Some rule fires and creates a JBPM process ( a fact gets inserted into drools using kcontext.getKnowledgeRuntime().startProcess(testProcess) ). We have a problem with the persistence of this processes. Persistence is implemented with JPA and JTA. Our application runs with fireUntilHalt() and when a process is launched from the consequence of any of the rules the persistence of the process fails. If the application runs with fireAllRules(), the persistence works like a charm. The error shown is as follow: Exception in thread Thread-5 Exception executing consequence for rule Run Process in com.sample: java.lang.NullPointerException at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1101) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1029) at org.drools.common.DefaultAgenda.fireUntilHalt(DefaultAgenda.java:1229) at org.drools.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:754) at org.drools.common.AbstractWorkingMemory.fireUntilHalt(AbstractWorkingMemory.java:730) at org.drools.command.runtime.rule.FireUntilHaltCommand$1.run(FireUntilHaltCommand.java:50) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.NullPointerException at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.addProcessInstance(JPAProcessInstanceManager.java:44) at org.jbpm.process.instance.AbstractProcessInstanceFactory.createProcessInstance(AbstractProcessInstanceFactory.java:36) at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:182) at org.jbpm.process.instance.ProcessRuntimeImpl.createProcessInstance(ProcessRuntimeImpl.java:154) at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:135) at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:130) at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1074) at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:301) at com.sample.Rule_Run_Process.defaultConsequence(Rule_Run_Process.java:9) at com.sample.Rule_Run_ProcessDefaultConsequenceInvoker.evaluate(Unknown Source) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1091) ... 6 more The problem is in this function: public void addProcessInstance(ProcessInstance processInstance) { ProcessInstanceInfo processInstanceInfo = new ProcessInstanceInfo( processInstance, this.kruntime.getEnvironment() ); ProcessPersistenceContext context = ((ProcessPersistenceContextManager) this.kruntime.getEnvironment() .get( EnvironmentName.PERSISTENCE_CONTEXT_MANAGER )) .getProcessPersistenceContext(); // @PrePersist added to ProcessInstanceInfo because of this context.persist( processInstanceInfo ); ((org.jbpm.process.instance.ProcessInstance) processInstance).setId( processInstanceInfo.getId() ); processInstanceInfo.updateLastReadDate(); internalAddProcessInstance(processInstance); } We think after that persist sentence, the entity manager would have to run a flush sentence for the process instance is inserted into database and get the ID. Greets. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] (no subject)
g.christabe...@gmail.com ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Using 'in' operator to find objects inside a list
As documented: Use 'memberOf' instead of 'in'. Regards, Frank purna wrote drl file looks like this.. global ArrayListLong accountNumberBlackList . . . rule blackListToCheck when $transaction : Transaction(accountTo.number in (accountNumberBlackList)) then $transaction.setStatus(Transaction.Status.DENIED); //.. do something else? end I want to use 'in' operator to find numbers that are stored in global variable accountNumberBlackList. Is the above syntax(in double quotes) correct? is there any alternative to look inside a list? -- View this message in context: http://drools.46999.n3.nabble.com/Using-in-operator-to-find-objects-inside-a-list-tp3812727p3812768.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] Drools Salience and no-loop
All sessions are created from the same Knowledge Base? What does replicate mean, exactly? Do you see the same effect when all facts are inserted into one session? What happens if you do call update in rule sub 1? -W On 9 March 2012 14:58, gboro54 gbor...@gmail.com wrote: So I have setup my drools execution as follows: 1.A single thread is pooling Orders from the db and insert them into X number of sessions(10) running on separate threads(fireUntilHalt()). 2. I have a set up rules which need to execute first to allow other rules to fire so I have rules such as: rule main 1 salience 1000 no-loop true when some_conditions then modify order info(update is invoked) end 3. There is another set of rules which then check the Order for these preconditions along with others rule sub 1 salience 100 no-loop true when some_conditions main 1 consequences present then modify order info(no update invoked as other rules in the session don't care) end 4. I then have a single rule which has a low salience and should be last rule to fire in the activation which retracts the Order and hands it to a service for post processsing rule END salience -100 no-loop true when ord:Order then retract(ord); invokeService(ord); end The problem I am having is that my END rule is being invoked on certain Orders in working memory before the other activation have taken any affect(I have verified this by send a replicated order 1000 times and each time a large majority his the service before anything was modified on the order). Am I missing something? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812723.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
Re: [rules-users] Drools Salience and no-loop
All sessions are against the same kBase. When I say replicate I mean I create 1 separate Orders all the same way(same values for all properties). I have not tried to insert all into one session and fire but can try if this really makes a difference(though I am not sure why it should). I will add an update to 1 as well but again I am not sure why this would matter to a low ranking rule who does not care about the actual values from that rule -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812869.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] Drools Salience and no-loop
Is salience ignore in a dslr? I changed the tech file to a regular DRL and everything seems to work. Additionally I configured the kBase for streaming mode. Does this have an affect on this as well? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812893.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] Drools Salience and no-loop
I take that back...Same issue still occuring... gboro54 wrote Is salience ignore in a dslr? I changed the tech file to a regular DRL and everything seems to work. Additionally I configured the kBase for streaming mode. Does this have an affect on this as well? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812906.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] Drools Salience and no-loop
It's difficult to imagine that doing the same thing with equal facts in identically configured sessions would create differing objects. And it was the intent of my questions to unearth some irregularity, and to narrow it down. STREAM mode shouldn't matter as you aren't using windows, expiry or other CEP features - or are you? -W On 9 March 2012 15:53, gboro54 gbor...@gmail.com wrote: All sessions are against the same kBase. When I say replicate I mean I create 1 separate Orders all the same way(same values for all properties). I have not tried to insert all into one session and fire but can try if this really makes a difference(though I am not sure why it should). I will add an update to 1 as well but again I am not sure why this would matter to a low ranking rule who does not care about the actual values from that rule -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812869.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
Re: [rules-users] Drools Salience and no-loop
No I am not using CEP and I didn't think STREAM mode made a difference. I am just as perplexed as you on why this is happening. Could it be salience is only respected in the same package(these are in different packages )? I am just taking a stab in the dark at this point. I generated audit logs and it can be seen that the removal rule activation is created first and executed first(it looks like 75% of the time based on my test this occurs) laune wrote It's difficult to imagine that doing the same thing with equal facts in identically configured sessions would create differing objects. And it was the intent of my questions to unearth some irregularity, and to narrow it down. STREAM mode shouldn't matter as you aren't using windows, expiry or other CEP features - or are you? -W On 9 March 2012 15:53, gboro54 lt;gboro54@gt; wrote: All sessions are against the same kBase. When I say replicate I mean I create 1 separate Orders all the same way(same values for all properties). I have not tried to insert all into one session and fire but can try if this really makes a difference(though I am not sure why it should). I will add an update to 1 as well but again I am not sure why this would matter to a low ranking rule who does not care about the actual values from that rule -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812869.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813013.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] Duration attritube and Temporal Operators
Pretty sure I am correct, think the devs are at a conference this week in London. http://blog.athico.com/ 1)Start time , point time interval. 2)Don't know exactly, I think the documentation is just showing what is meant. But it does say you need to set at least the start time and duration. If you don't set the time stamp , it gets a timestamp of the time it was inserting into working memory and duration 0. 3)timestamp is the same as start time. if no duration is set In our rule set , I set a timestamp attribute, duration and also a endtimestamp. You can also do items like this , but reading the docs I am double checking timeEndMs after[-120s,120s] AND0.timeMs , More is in the http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-fusion-docs/html/ch02.html#d0e289 I think the start and endtime time stamp statements in the documentation is for clarity. When working with the rules we have , reading the documentation let me know if the temporal operators is what I needed. On Mar 8, 2012 11:55 AM, mind gil.vegli...@gmail.com wrote: Hello everybody, I recently started using Drools (with C#) and I have some problems in understanding how temporal operators work with the duration field. According to the documentation, the temporal operators work with startTimestamp and endTimestamp of events, the semantics being defined with inequalities. In order to work, temporal operator requires the duration field to be declared. Now the questions: 1. What does @timeStamp stay for? The start or the end timestamp? 2. Does Drools calculate startTimestamp and endTimestamp if I set @timeStamp and @duration attribute from my C# code? If not how can I set them? (like shall I declare like @startTimeStamp(sth) and set from the C# code?) 3. Do temporal operators work if I do not set explicitly the start and end timestamps but just @timeStamp and @duration attributes? In particular, I have this drl file (%VAR% are replaced by other code): declare IntensionalEvent @role(event) @timeStamp(timeStamp) @duration(duration) end rule Expression (%EVENTNAME1%, %OPERATOR%, %EVENTNAME2%, %TIMESPAN%, %TIMEVAR%) dialect mvel when $eventA : IntensionalEvent( name == '%EVENTNAME2%' ) $eventB : IntensionalEvent( this %OPERATOR% $eventA, name == '%EVENTNAME1%' ) over window:time( %TIMESPAN% ) then blah blah... create an IntensionalEvent and set timestamp and duration end Thanks everybody, Gil -- View this message in context: http://drools.46999.n3.nabble.com/Duration-attritube-and-Temporal-Operators-tp3810201p3810201.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
Re: [rules-users] Drools Salience and no-loop
So I changed the package name to be the same and the situation did not occur at all...Is salience not honored across packages? gboro54 wrote No I am not using CEP and I didn't think STREAM mode made a difference. I am just as perplexed as you on why this is happening. Could it be salience is only respected in the same package(these are in different packages )? I am just taking a stab in the dark at this point. I generated audit logs and it can be seen that the removal rule activation is created first and executed first(it looks like 75% of the time based on my test this occurs) laune wrote It's difficult to imagine that doing the same thing with equal facts in identically configured sessions would create differing objects. And it was the intent of my questions to unearth some irregularity, and to narrow it down. STREAM mode shouldn't matter as you aren't using windows, expiry or other CEP features - or are you? -W On 9 March 2012 15:53, gboro54 lt;gboro54@gt; wrote: All sessions are against the same kBase. When I say replicate I mean I create 1 separate Orders all the same way(same values for all properties). I have not tried to insert all into one session and fire but can try if this really makes a difference(though I am not sure why it should). I will add an update to 1 as well but again I am not sure why this would matter to a low ranking rule who does not care about the actual values from that rule -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812869.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813074.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] Duration attritube and Temporal Operators
1) Ok, I need the precise semantics for interval-based event, not the point events. 2) Well the docs lacks information on the starting time and the ending time of events and then defines the semantics of temporal operators: there must be something missing. Moreover even looking at the example I couldn't fine anything. 3) I want to set the duration though, all my software works with interval-based events... Gil -- View this message in context: http://drools.46999.n3.nabble.com/Duration-attritube-and-Temporal-Operators-tp3810201p3813079.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] Drools Salience and no-loop
Salience is a field in the Activation object, used for ranking another entry when it is inserted into the List. Looking at the package name for this or at this time would be futile. -W On 9 March 2012 16:44, gboro54 gbor...@gmail.com wrote: No I am not using CEP and I didn't think STREAM mode made a difference. I am just as perplexed as you on why this is happening. Could it be salience is only respected in the same package(these are in different packages )? I am just taking a stab in the dark at this point. I generated audit logs and it can be seen that the removal rule activation is created first and executed first(it looks like 75% of the time based on my test this occurs) laune wrote It's difficult to imagine that doing the same thing with equal facts in identically configured sessions would create differing objects. And it was the intent of my questions to unearth some irregularity, and to narrow it down. STREAM mode shouldn't matter as you aren't using windows, expiry or other CEP features - or are you? -W On 9 March 2012 15:53, gboro54 lt;gboro54@gt; wrote: All sessions are against the same kBase. When I say replicate I mean I create 1 separate Orders all the same way(same values for all properties). I have not tried to insert all into one session and fire but can try if this really makes a difference(though I am not sure why it should). I will add an update to 1 as well but again I am not sure why this would matter to a low ranking rule who does not care about the actual values from that rule -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812869.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813013.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
Re: [rules-users] Drools Salience and no-loop
Perhaps I am building my packages weird but if all my drl/dslr are under the same package the salience is honored and all the rules are fired in order. Why would it work in this way? Since changing all the files to the same package I have done 10 runs of the test with 100% success. Am I building the kBase in weird manner(I don't think so but look below): if (logger.isDebugEnabled()) { logger.debug(Knowledge base with the following changeset was requested built + changeset); } KnowledgeBuilder kbuilder = KnowledgeBuilderFactory .newKnowledgeBuilder(); kbuilder.add(ResourceFactory.newClassPathResource(changeset), ResourceType.CHANGE_SET); KnowledgeBuilderErrors errors = kbuilder.getErrors(); if (errors.size() 0) { StringBuilder sb = new StringBuilder(); for (KnowledgeBuilderError error : errors) { sb.append(error + \n); logger.error(error); } throw new IllegalArgumentException(Could not parse knowledge. \n + sb); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); return kbase; Would this cause any fragmenting when the engine is indexing the rules for activation? I would think not. I am just going by the current results I have gotten by declaring all rules in the same package. laune wrote Salience is a field in the Activation object, used for ranking another entry when it is inserted into the List. Looking at the package name for this or at this time would be futile. -W On 9 March 2012 16:44, gboro54 lt;gboro54@gt; wrote: No I am not using CEP and I didn't think STREAM mode made a difference. I am just as perplexed as you on why this is happening. Could it be salience is only respected in the same package(these are in different packages )? I am just taking a stab in the dark at this point. I generated audit logs and it can be seen that the removal rule activation is created first and executed first(it looks like 75% of the time based on my test this occurs) laune wrote It's difficult to imagine that doing the same thing with equal facts in identically configured sessions would create differing objects. And it was the intent of my questions to unearth some irregularity, and to narrow it down. STREAM mode shouldn't matter as you aren't using windows, expiry or other CEP features - or are you? -W On 9 March 2012 15:53, gboro54 lt;gboro54@gt; wrote: All sessions are against the same kBase. When I say replicate I mean I create 1 separate Orders all the same way(same values for all properties). I have not tried to insert all into one session and fire but can try if this really makes a difference(though I am not sure why it should). I will add an update to 1 as well but again I am not sure why this would matter to a low ranking rule who does not care about the actual values from that rule -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812869.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813013.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813137.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] Drools Salience and no-loop
Could be there is a race condition in the builder. I would not use a changeset unless you really need dynamic changes of your rules. Simply feed the builder with DRL or whatever, create the Knowledge Base and then the sessions. -W On 9 March 2012 17:25, gboro54 gbor...@gmail.com wrote: Perhaps I am building my packages weird but if all my drl/dslr are under the same package the salience is honored and all the rules are fired in order. Why would it work in this way? Since changing all the files to the same package I have done 10 runs of the test with 100% success. Am I building the kBase in weird manner(I don't think so but look below): if (logger.isDebugEnabled()) { logger.debug(Knowledge base with the following changeset was requested built + changeset); } KnowledgeBuilder kbuilder = KnowledgeBuilderFactory .newKnowledgeBuilder(); kbuilder.add(ResourceFactory.newClassPathResource(changeset), ResourceType.CHANGE_SET); KnowledgeBuilderErrors errors = kbuilder.getErrors(); if (errors.size() 0) { StringBuilder sb = new StringBuilder(); for (KnowledgeBuilderError error : errors) { sb.append(error + \n); logger.error(error); } throw new IllegalArgumentException(Could not parse knowledge. \n + sb); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); return kbase; Would this cause any fragmenting when the engine is indexing the rules for activation? I would think not. I am just going by the current results I have gotten by declaring all rules in the same package. laune wrote Salience is a field in the Activation object, used for ranking another entry when it is inserted into the List. Looking at the package name for this or at this time would be futile. -W On 9 March 2012 16:44, gboro54 lt;gboro54@gt; wrote: No I am not using CEP and I didn't think STREAM mode made a difference. I am just as perplexed as you on why this is happening. Could it be salience is only respected in the same package(these are in different packages )? I am just taking a stab in the dark at this point. I generated audit logs and it can be seen that the removal rule activation is created first and executed first(it looks like 75% of the time based on my test this occurs) laune wrote It's difficult to imagine that doing the same thing with equal facts in identically configured sessions would create differing objects. And it was the intent of my questions to unearth some irregularity, and to narrow it down. STREAM mode shouldn't matter as you aren't using windows, expiry or other CEP features - or are you? -W On 9 March 2012 15:53, gboro54 lt;gboro54@gt; wrote: All sessions are against the same kBase. When I say replicate I mean I create 1 separate Orders all the same way(same values for all properties). I have not tried to insert all into one session and fire but can try if this really makes a difference(though I am not sure why it should). I will add an update to 1 as well but again I am not sure why this would matter to a low ranking rule who does not care about the actual values from that rule -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3812869.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813013.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813137.html Sent from the Drools: User forum mailing list archive at Nabble.com.
[rules-users] How to include one .drl file from another .drl file
Is there something like #include for drl files? That is, something like this: rule 1 when then doSomething; end #include another.drl rule 2 when ... I know I can load multiple drl files into the knowledge base in Java. I'm just wondering whether someone writing a drl file can include other drls without having to copy and paste. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Salience and no-loop
Each builder is building off multiple files. I guess I could provide a list of these resources. Is there any worry about the order in which the packages are built then? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813430.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] Drools Salience and no-loop
No. (DSLs must be loaded before any DSLRs using them.) -W On 9 March 2012 19:18, gboro54 gbor...@gmail.com wrote: Each builder is building off multiple files. I guess I could provide a list of these resources. Is there any worry about the order in which the packages are built then? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813430.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
Re: [rules-users] How to include one .drl file from another .drl file
No. -W On 9 March 2012 19:15, Shur, Bob robert.s...@hp.com wrote: Is there something like #include for drl files? That is, something like this: rule 1 when then doSomething; end #include another.drl rule 2 when ... I know I can load multiple drl files into the knowledge base in Java. I'm just wondering whether someone writing a drl file can include other drls without having to copy and paste. ___ 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 Salience and no-loop
That I figured Just out of curiosity why would a changeset cause a race condition? I understand why a changeset may not be ideal for here but for future implementations(I have used changsets mainly with Guvnor built/manages packages). laune wrote No. (DSLs must be loaded before any DSLRs using them.) -W On 9 March 2012 19:18, gboro54 lt;gboro54@gt; wrote: Each builder is building off multiple files. I guess I could provide a list of these resources. Is there any worry about the order in which the packages are built then? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813430.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813484.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] Drools Salience and no-loop
The resource scanner runs in another thread. So when you start this service, but don't monitor or sync with its events, grab stuff - well, I would be very cagey there. -W On 9 March 2012 19:31, gboro54 gbor...@gmail.com wrote: That I figured Just out of curiosity why would a changeset cause a race condition? I understand why a changeset may not be ideal for here but for future implementations(I have used changsets mainly with Guvnor built/manages packages). laune wrote No. (DSLs must be loaded before any DSLRs using them.) -W On 9 March 2012 19:18, gboro54 lt;gboro54@gt; wrote: Each builder is building off multiple files. I guess I could provide a list of these resources. Is there any worry about the order in which the packages are built then? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813430.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Salience-and-no-loop-tp3812723p3813484.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
Re: [rules-users] Duration attritube and Temporal Operators
Hi all, i have the same problem, i haven't well understood meaning and use of timestamp and duration fields. From my understanding, timestamp field is start time and duration is difference between end time and start time. Is it rigth? On the other hand, i know that it is a good practice don't change these 2 fields. I mean, it isn't suggested to modify duration or timestamp after that the event is inserted in session (is it right?) Furthermore, it is bad practice to insert an event with old timestamp, compared to system time. So, i don't understand, how is it possible to manage event with duration. If i have an event with timestamp t1 and duration 5s, of course i know it when it is finished, so i have to insert it into session with old timestamp. Sorry for bad English, i hope i was clear. Thanks a lot, On Fri, Mar 9, 2012 at 5:08 PM, mind gil.vegli...@gmail.com wrote: 1) Ok, I need the precise semantics for interval-based event, not the point events. 2) Well the docs lacks information on the starting time and the ending time of events and then defines the semantics of temporal operators: there must be something missing. Moreover even looking at the example I couldn't fine anything. 3) I want to set the duration though, all my software works with interval-based events... Gil -- View this message in context: http://drools.46999.n3.nabble.com/Duration-attritube-and-Temporal-Operators-tp3810201p3813079.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
Re: [rules-users] How to include one .drl file from another .drl file
If you don't want to add the resources from the code directly, you can use a changeset resource adding the two DRLs -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-How-to-include-one-drl-file-from-another-drl-file-tp3813426p3813563.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] How to include one .drl file from another .drl file
Am 09.03.2012 19:16 schrieb Shur, Bob robert.s...@hp.com: Is there something like #include for drl files? That is, something like this: rule 1 when then doSomething; end #include another.drl rule 2 when ... I know I can load multiple drl files into the knowledge base in Java. I'm just wondering whether someone writing a drl file can include other drls without having to copy and paste. If you want to achieve binary code reuse for your *.drl files (in contrast to source code reuse), you might want to have a closer look at the Maven Drools Plugin. [1] Kind regards, Ansgar [1] http://passion.forco.de/content/maven-drools-plugin ___ 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] Duration attritube and Temporal Operators
There are two values that Drools uses with facts that have been given @role(event): timestamp and duration. The timestamp may be a fact field, provided by you, or added automatically (in a hidden location) by Drools. If it is a field called x, you must say @timestamp( x ) in the declare. The duration field must be provided as a fact field, say y, so you must say @duration( y ) in the declare, or else duration is 0. @timestamp and @duration cannot be changed after the event's insertion. If you have an event whose end you don't know when you are informed about it's beginning, then you'll have to make do with two events, one marking the start and the other one the end. If you're in CLOUD mode, you can combine a start and a matching end event to one with a start and a duration and continue to reason with that. -W 2012/3/9 Matteo Cusmai cusmaimat...@gmail.com Hi all, i have the same problem, i haven't well understood meaning and use of timestamp and duration fields. From my understanding, timestamp field is start time and duration is difference between end time and start time. Is it rigth? On the other hand, i know that it is a good practice don't change these 2 fields. I mean, it isn't suggested to modify duration or timestamp after that the event is inserted in session (is it right?) Furthermore, it is bad practice to insert an event with old timestamp, compared to system time. So, i don't understand, how is it possible to manage event with duration. If i have an event with timestamp t1 and duration 5s, of course i know it when it is finished, so i have to insert it into session with old timestamp. Sorry for bad English, i hope i was clear. Thanks a lot, On Fri, Mar 9, 2012 at 5:08 PM, mind gil.vegli...@gmail.com wrote: 1) Ok, I need the precise semantics for interval-based event, not the point events. 2) Well the docs lacks information on the starting time and the ending time of events and then defines the semantics of temporal operators: there must be something missing. Moreover even looking at the example I couldn't fine anything. 3) I want to set the duration though, all my software works with interval-based events... Gil -- View this message in context: http://drools.46999.n3.nabble.com/Duration-attritube-and-Temporal-Operators-tp3810201p3813079.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users