[rules-users] Workbench not Working in Resilient Environment

2014-06-18 Thread Zahid Ahmed
Hi,

I am trying to setup Drools6 Workbench ion a resilient mode but am unable to 
sync the assets amongst the resilient members. Kindly have a look at the 
detailed question posted earlier.

Subject in Drools Forum "Drools Workbench | VFS Clustering Error | NoNode for 
jbpm-cluster"

Regards,
Zahid Ahmed



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

Re: [rules-users] Need BRMS migration tool download zip file location to download

2014-06-18 Thread Michael Anstis
Download the Drools Workbench distribution from the Drools download page on
the Drools website. It is in that zip file (jcr2vfs migration).

Sent on the move
On 19 Jun 2014 06:36, "LaKhI ReDdY!!!" 
wrote:

> Hi ,
>
> I need to migrate repository from BRMS 5.1.1 to BRMS 6.0.1.
> In BRMS 6.0.1 Administration And Configuration Guide , i read we can do
> migrating using data migration tool.
> I could not able to find where this migration tool download zip available.
>
> IF anybody knows, please provide me the path/location/url to download the
> migration tool zip file?
>
> Thanks,
> Lakshmi Reddy
>
>
> ___
> 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] Need BRMS migration tool download zip file location to download

2014-06-18 Thread LaKhI ReDdY!!!!!!!!!!!
Hi ,

I need to migrate repository from BRMS 5.1.1 to BRMS 6.0.1.
In BRMS 6.0.1 Administration And Configuration Guide , i read we can do
migrating using data migration tool.
I could not able to find where this migration tool download zip available.

IF anybody knows, please provide me the path/location/url to download the
migration tool zip file?

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

Re: [rules-users] Problems compiling huge rule base with kie-maven-plugin

2014-06-18 Thread Federico Bertola
Hi Mario, thanks for the quick reply.
Yes I could definitely open a jira and a pull request, just be patient 
though, as I've to isolate the code from our own.
Reproducing the slowdown I experienced would be a little problematic 
because it depends, I think, entirely on the size (and "shape") of our RB.

Thanks again,
Federico.

On 06/18/2014 05:48 PM, Mario Fusco wrote:
> Hi Federico,
>
> so we have 2 problems here. For what regards the compilation one I'd be
> curious to see your solution. Could you please open a ticket on our jira and
> attach it there, or maybe send a pull request on github? As for the runtime,
> yes probably loading stuff lazier in the KieContainer could alleviate also
> that problem, but first I'd like to give a look at what you're doing to
> better understand your use case. Could you also attach a reproducer to that
> jira ticket?
>
> Thanks,
> Mario
>
>
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Possible-problem-in-PathMemory-tp4030026p4030093.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] Noob question: graph searching, query, root node for a given node

2014-06-18 Thread Borris
Thanks Mark. I should probably focus on your observation that my graph is not
in the working memory. Let me go and have a thank. Good food to prompt me to
think!



--
View this message in context: 
http://drools.46999.n3.nabble.com/Noob-question-graph-searching-query-root-node-for-a-given-node-tp4030091p4030104.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] accumulate function not registered

2014-06-18 Thread Davide Sottara
can you please open a jira ticket and possibly add a reproducer?
It seems a serious regression, but it would have to be reproduced
and fixed in the next few days for this to make it to the final release
Thanks!
Davide

On 06/18/2014 03:26 PM, rogerL wrote:
> After upgrade to 6.1.0.CR1 rule compilation is generating a pluggable
> accumulate function registration error.
>
> Partial stack dump:
> Caused by: java.lang.RuntimeException: Error while creating KieBase[Message
> [id=1, level=ERROR,
> path=com/s/c/manager/rules/campaign/priority/prioritize.drl, line=31,
> column=0
>text=Unknown accumulate function: 'topPriority' on rule 'Insert highest
> priority campaign'. All accumulate functions must be registered before
> building a resource.], Message [id=2, level=ERROR,
> path=com/s/c/manager/rules/campaign/priority/prioritize.drl, line=31,
> column=0
>text=Rule Compilation error $tc cannot be resolved to a variable]]
>
> The associated rule and accumulate import are:
>
> import accumulate com.s.c.util.HighestPriorityCampaignAccumulateFunction
> topPriority;
>
> rule "Insert highest priority campaign"
> when
> not TopCampaign()
> accumulate(TargetCampaigns($list : list, list.size >0), $tc :
> topPriority( $list ) )
> then
> insert(new TopCampaign($tc));
> end
>
> Is this syntax no longer correct?
>
>
>
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/accumulate-function-not-registered-tp4030102.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] accumulate function not registered

2014-06-18 Thread rogerL
After upgrade to 6.1.0.CR1 rule compilation is generating a pluggable
accumulate function registration error.

Partial stack dump:
Caused by: java.lang.RuntimeException: Error while creating KieBase[Message
[id=1, level=ERROR,
path=com/s/c/manager/rules/campaign/priority/prioritize.drl, line=31,
column=0
   text=Unknown accumulate function: 'topPriority' on rule 'Insert highest
priority campaign'. All accumulate functions must be registered before
building a resource.], Message [id=2, level=ERROR,
path=com/s/c/manager/rules/campaign/priority/prioritize.drl, line=31,
column=0
   text=Rule Compilation error $tc cannot be resolved to a variable]]

The associated rule and accumulate import are:

import accumulate com.s.c.util.HighestPriorityCampaignAccumulateFunction
topPriority;

rule "Insert highest priority campaign"
when
not TopCampaign()
accumulate(TargetCampaigns($list : list, list.size >0), $tc :
topPriority( $list ) )
then
insert(new TopCampaign($tc));
end

Is this syntax no longer correct?



--
View this message in context: 
http://drools.46999.n3.nabble.com/accumulate-function-not-registered-tp4030102.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] KieContainer#updateToVersion fails when both versions of a drl file contain an event type declaration for an existing class

2014-06-18 Thread Mark Proctor
Looks like a bug. Please try on 6.1CR1.
http://mvnrepository.com/artifact/org.drools

If it’s not fixed, and yo want it fixed you’ll need to submit a pull request 
with a failing unit test:
http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html

You can see unit tests for incremental updates here:
https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java

Please try and add your unit test to that class, in the same format as the 
other tests.

Mark
On 18 Jun 2014, at 20:30, mikedev9000  wrote:

> I am using the latest drools 6.1.0-SNAPSHOT. I have two jars containing
> different versions of a KieModule, and they each contain a drl file with an
> event type declaration for an existing class. If I try to update the
> container from one version to the other, the call to
> KieContainer#updateToVersion returns a Results instance that contains errors
> related to the @timestamp attribute on that event declaration. Here is an
> example of the error message: "[Message [id=1, level=ERROR, path=r0.drl,
> line=3, column=0
>   text=Error creating field accessors for timestamp field 'mytime' for type
> 'FooEvent']]".
> 
> The following .patch file can be used to add a unit test to the
> IncrementalCompilationTest.java file that demonstrates this problem. 
> 
> test_container_update_problem.patch
> 
>   
> 
> After applying the patch, and running this unit test, I see the following
> test failure:
> 
> 
> java.lang.AssertionError: Errors detected on updateToVersion: [Message
> [id=1, level=ERROR, path=r0.drl, line=3, column=0
>   text=Error creating field accessors for timestamp field 'mytime' for type
> 'FooEvent']]
>   at org.junit.Assert.fail(Assert.java:88)
>   at org.junit.Assert.assertTrue(Assert.java:41)
>   at org.junit.Assert.assertFalse(Assert.java:64)
>   at
> org.drools.compiler.integrationtests.IncrementalCompilationTest.testUpdateWithDeclarationPresent(IncrementalCompilationTest.java:95)
> 
> 
> 
> This error makes it nearly impossible for me to rely on and use
> KieContainer#updateToVersion, because I need to allow frequent changes to be
> made to drl files at run time, and I would prefer not to recreate the
> KieContainer, and all of its KieBases and KieSessions on every update.
> 
> Is this a known issue? If so, are there plans to fix it before the
> 6.1.0.Final release?
> 
> 
> 
> 
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/KieContainer-updateToVersion-fails-when-both-versions-of-a-drl-file-contain-an-event-type-declaratios-tp4030100.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] KieContainer#updateToVersion fails when both versions of a drl file contain an event type declaration for an existing class

2014-06-18 Thread mikedev9000
I am using the latest drools 6.1.0-SNAPSHOT. I have two jars containing
different versions of a KieModule, and they each contain a drl file with an
event type declaration for an existing class. If I try to update the
container from one version to the other, the call to
KieContainer#updateToVersion returns a Results instance that contains errors
related to the @timestamp attribute on that event declaration. Here is an
example of the error message: "[Message [id=1, level=ERROR, path=r0.drl,
line=3, column=0
   text=Error creating field accessors for timestamp field 'mytime' for type
'FooEvent']]".

The following .patch file can be used to add a unit test to the
IncrementalCompilationTest.java file that demonstrates this problem. 

test_container_update_problem.patch

  

After applying the patch, and running this unit test, I see the following
test failure:


java.lang.AssertionError: Errors detected on updateToVersion: [Message
[id=1, level=ERROR, path=r0.drl, line=3, column=0
   text=Error creating field accessors for timestamp field 'mytime' for type
'FooEvent']]
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertFalse(Assert.java:64)
at
org.drools.compiler.integrationtests.IncrementalCompilationTest.testUpdateWithDeclarationPresent(IncrementalCompilationTest.java:95)



This error makes it nearly impossible for me to rely on and use
KieContainer#updateToVersion, because I need to allow frequent changes to be
made to drl files at run time, and I would prefer not to recreate the
KieContainer, and all of its KieBases and KieSessions on every update.

Is this a known issue? If so, are there plans to fix it before the
6.1.0.Final release?




--
View this message in context: 
http://drools.46999.n3.nabble.com/KieContainer-updateToVersion-fails-when-both-versions-of-a-drl-file-contain-an-event-type-declaratios-tp4030100.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] Noob question: graph searching, query, root node for a given node

2014-06-18 Thread Mark Proctor
It looks like your graph is not in the WM, so you can just iterate the 
references. Here is an example of how to do this. 

@Test
public void testGraphIterationToFindLeafs() {
String drl = "import " + Datum.class.getCanonicalName() + ";\n" +
 "import java.util.List;\n" +

 "query findLeafs(Datum datum, List results)\n" +
 "( eval( datum.getChildren().size() == 0 ) and \n" +
 "  eval( results.add ( datum ) ) )\n" +
 "or \n" +
 "( eval( datum.getChildren().size() != 0 ) and \n" +
 "  child : Datum( ) from datum.children and\n" +
 "  findLeafs( child, results; ) ) \n" +
 "end\n";

System.out.println( drl );

KnowledgeBase knowledgeBase = loadKnowledgeBaseFromString( drl );
StatefulKnowledgeSession ksession = 
knowledgeBase.newStatefulKnowledgeSession();
List list = new ArrayList();

Datum d1 = new Datum("d1");
Datum d2 = new Datum("d2");
Datum d3 = new Datum("d3");
Datum d4 = new Datum("d4");
Datum d5 = new Datum("d5");
Datum d6 = new Datum("d6");
Datum d7 = new Datum("d7");

d1.getChildren().add( d2 );
d1.getChildren().add( d3 );

d3.getChildren().add( d4 );
d3.getChildren().add( d5 ) ;
d5.getChildren().add( d6 ) ;
d6.getChildren().add( d7 ) ;

ksession.getQueryResults("findLeafs", d1, list);

System.out.println( list );

}

public static class Datum {
private String description;
private List children;

public Datum(String description) {
this.description = description;
children = new ArrayList();
}

public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public List getChildren() {
return children;
}

@Override
public String toString() {
return "Datum{" +
   "description='" + description + '\'' +
   '}';
}
}

On 18 Jun 2014, at 18:44, Borris  wrote:

> Good question. I'm supporting a graph rather than a tree, so theoretically
> there could be more than one node that has no parents. But in my particular
> use case I am constraining the data so that there is never more than one
> root node.
> 
> So how to find the root node (singular) from an arbitrary node in the graph
> is my goal.
> 
> 
> 
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Noob-question-graph-searching-query-root-node-for-a-given-node-tp4030091p4030096.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] Noob question: graph searching, query, root node for a given node

2014-06-18 Thread Borris
I guess it's probably useful for me to add that there are multiple such
graphs and key part of the operation is which graph a datum belongs to.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Noob-question-graph-searching-query-root-node-for-a-given-node-tp4030091p4030097.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] Noob question: graph searching, query, root node for a given node

2014-06-18 Thread Wolfgang Laun
Terms like "root" and "parent" are used with trees. You might call
these nodes "nodes with indegree 0".
-W


On 18/06/2014, Borris  wrote:
> Good question. I'm supporting a graph rather than a tree, so theoretically
> there could be more than one node that has no parents. But in my particular
> use case I am constraining the data so that there is never more than one
> root node.
>
> So how to find the root node (singular) from an arbitrary node in the graph
> is my goal.
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Noob-question-graph-searching-query-root-node-for-a-given-node-tp4030091p4030096.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] Noob question: graph searching, query, root node for a given node

2014-06-18 Thread Borris
Good question. I'm supporting a graph rather than a tree, so theoretically
there could be more than one node that has no parents. But in my particular
use case I am constraining the data so that there is never more than one
root node.

So how to find the root node (singular) from an arbitrary node in the graph
is my goal.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Noob-question-graph-searching-query-root-node-for-a-given-node-tp4030091p4030096.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] Noob question: graph searching, query, root node for a given node

2014-06-18 Thread Mark Proctor
> I want a query that takes a datum and yields the root nodes for that datum.
Do you mean root node or nodes? Surely there can only be one root? Or do you 
mean you are looking for the leafs?

Mark
On 18 Jun 2014, at 13:31, Borris  wrote:

> I'm after a quick bit of help on how to do something that I think should be
> easy but I can't work out how.
> 
> I have a Java-side class that essentially is something like
> 
> declare Datum
>description: String
>broader: List 
>narrower: List 
> end
> 
> These are arranged in a graph. Root nodes have no items in their broader
> list. I want a query that takes a datum and yields the root nodes for that
> datum. I think this should look something like
> 
> query rootDatumsFor( Datum datum, Datum result )
>not Datum() from $datum.broader
>or
>rootDatumsFor( $datum.broader, $result )
> end
> 
> but I then get confused. When there are no broader items, I am unclear how
> to assign $datum to $result. And I'm not convinced I'm doing the recursion
> correctly either.
> 
> If an experienced Drools author could spend a minute and show me how to do
> this sensibly, I would be very grateful.
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://drools.46999.n3.nabble.com/Noob-question-graph-searching-query-root-node-for-a-given-node-tp4030091.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] Problems compiling huge rule base with kie-maven-plugin

2014-06-18 Thread Mario Fusco
Hi Federico,

so we have 2 problems here. For what regards the compilation one I'd be
curious to see your solution. Could you please open a ticket on our jira and
attach it there, or maybe send a pull request on github? As for the runtime,
yes probably loading stuff lazier in the KieContainer could alleviate also
that problem, but first I'd like to give a look at what you're doing to
better understand your use case. Could you also attach a reproducer to that
jira ticket?

Thanks,
Mario



--
View this message in context: 
http://drools.46999.n3.nabble.com/Possible-problem-in-PathMemory-tp4030026p4030093.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] Problems compiling huge rule base with kie-maven-plugin

2014-06-18 Thread Federico Bertola
Hi all,
at work we have a huge rule base (>2k rules with an average size of ~2Mib).
I've found the building this RB with the latest kie-maven-plugin 
troublesome at best.
I want to share my experience hoping that some Drools developer could 
help me.

I'm using the latest Drools 6.x from the master branch.

The first problem I encounterd was that the compilation process retain 
in memory all the compilation caches until the end.
This would lead to a OOM very soon and we can't increase the heap size 
indefinitely. So the first thing I do was to extract
the code from KieModuleMetaInfoBuilder and create a custom builder that 
would populate a guava cache for every KnowledgeBase compiled.
The aforementioned cache would write the bytestreams when the objects 
get evicted.
That worked well and leaded finally to a full compilation. The only 
problem was the long time one has to wait until completion.
Some few rules take up to 30 min. to complete but the majority takes 
from 5 to 20 secs.
So I extended the custom compiler to be multithreaded and finally the 
compilation time is acceptable again.
I also extended the compiler to perform incremental compilations.

Now my problem is that the generated kjar is rather huge and when I load 
it I get an OOM again.
Peeking at the code again confirm (if I get this correctly) that all the 
caches gets loaded altogether, moving the problem to compile time to run 
time.
Is it possible to force the KieContainer to load the caches lazily, 
based on calls to getKieBase? If not, would it be usefull?

I understand that my case is rather on the edge but any help would be 
appreciated.

Thank you very much :)

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


[rules-users] Noob question: graph searching, query, root node for a given node

2014-06-18 Thread Borris
I'm after a quick bit of help on how to do something that I think should be
easy but I can't work out how.

I have a Java-side class that essentially is something like

declare Datum
description: String
broader: List 
narrower: List 
end

These are arranged in a graph. Root nodes have no items in their broader
list. I want a query that takes a datum and yields the root nodes for that
datum. I think this should look something like

query rootDatumsFor( Datum datum, Datum result )
not Datum() from $datum.broader
or
rootDatumsFor( $datum.broader, $result )
end

but I then get confused. When there are no broader items, I am unclear how
to assign $datum to $result. And I'm not convinced I'm doing the recursion
correctly either.

If an experienced Drools author could spend a minute and show me how to do
this sensibly, I would be very grateful.






--
View this message in context: 
http://drools.46999.n3.nabble.com/Noob-question-graph-searching-query-root-node-for-a-given-node-tp4030091.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