Re: [rules-users] Null pointer when using .applyChangeSet()

2012-11-28 Thread rjr201
Ok I managed to sort this. 

'PackageIsSource: false' has nothing to do with it. It was because the .jar
files that my Java program was using weren't the same as the .jar files that
Guvnor was using. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Null-pointer-when-using-applyChangeSet-tp4020983p4020996.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] Using Guvnor with Seam

2012-12-14 Thread rjr201
Hi,

I'm very interested in using Drools Guvnor with Seam and was hoping someone
here may have some experience of doing this. 

I've currently got Seam 2.3 working fine with Guvnor 5.3. My question is, is
it possible to get Seam 2.3 working with Guvnor 5.5? Or is it necessary to
move onto Seam 3 in order to do this?

>From my understanding, the drools libraries that come with Seam 2.3 aren't
compatible with versions of Guvnor later than 5.3. I've experimented with
replacing Seam's drools libraries with the latest drools libraries (as used
by Guvnor 5.5) but then Seam complains, as it requires the older drools
libraries for some of it's internal workings.

Any advice/experience with this would be greatly appreciated. 

Rich. 




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


Re: [rules-users] Using Guvnor with Seam

2012-12-21 Thread rjr201
So for my late reply, but thanks for confirming that. That's exactly what I
was looking for. 

Cheers,
Rich.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-Guvnor-with-Seam-tp4021210p4021281.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] DSL Enumerations

2013-01-21 Thread rjr201
Hi,

I'm creating a DSL with dropdown boxes that are populated by enumerations. I
have so far had success in making one drop down box dependent on the value
of another dropdown box on the same [when] line:

[when]For every {objectType:ENUM:Object.type} with
{attribute:ENUM:Object.attribute} equal to {value:ENUM:Object.value} =
{objectType}({attribute} == "{value}")

In the above example whatever value is chosen for objectType will dictate
the values in the attribute dropdown which in turn dictates the values in
the Value dropdown. 

My question is this: Is it possible to have a dropdown box reliant on the
value of a dropdown box on a /different / line of the rule?

I've tried a few different ways but am having no luck. 

Thanks for any help anyone can give me on this.
Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/DSL-Enumerations-tp4021696.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] DSL Enumerations

2013-01-22 Thread rjr201
Ok. Thanks for letting me know. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/DSL-Enumerations-tp4021696p4021727.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] .BRL in Eclipse

2013-01-28 Thread rjr201
Hi,

I'm creating rules within the Guided Editor in Guvnor as this is how my
client wants to view and edit them. 

Looking at the documentation  here

  
it seems to say that I can create and edit .brl files in Eclipse?

I can't seem to work out how to do this. I have what I think is the latest
version of JBoss tools. Does anyone know if this feature has been removed? 

It would be very useful to be able to develop the rules in Eclipse rather
than having to create them in Guvnor. 

Also, another quick question.. is it possible to convert from .dsl files to
.brl files?

Thanks for any advice that anyone can give. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/BRL-in-Eclipse-tp4021844.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] .BRL in Eclipse

2013-01-28 Thread rjr201
Hi, thanks for your fast response.

I've done as you've suggested, but eclipse only lets me see the .brl as a
text file rather than rendering as it would look in Guvnor. 

I suspect support in Eclipse for the guided editor has been dropped with the
last couple of releases. Unless i'm missing something.

Again, thanks for any help/advice anyone has on this.  



--
View this message in context: 
http://drools.46999.n3.nabble.com/BRL-in-Eclipse-tp4021844p4021846.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] .BRL in Eclipse

2013-01-28 Thread rjr201
In fact i've found my answer: 
http://drools.46999.n3.nabble.com/Guided-Rule-option-not-visible-in-Eclipse-td4019119.html

  



--
View this message in context: 
http://drools.46999.n3.nabble.com/BRL-in-Eclipse-tp4021844p4021847.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] applyChangeSet slow

2013-01-28 Thread rjr201
Hi,

I've created a rule package in Guvnor which I have been accessing using a
changeset.xml file. When calling applyChangeSet() on the KnowledgeAgent, it
is taking roughly 5 seconds to complete. Is this normal?

I don't have a large amount of rules. I have tried downloading the package
file and having the changeset.xml read it locally, but it is still taking a
long time to apply. Does anyone know of a way to speed this up?

I'm very grateful for any help/advice anyone can give me on this.

Cheers,
Rich.  



--
View this message in context: 
http://drools.46999.n3.nabble.com/applyChangeSet-slow-tp4021861.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] Can get "not equal" (!=) to work but not "equal" (==) in LHS

2013-02-05 Thread rjr201
It may be because in Java you have to compare strings using .equals("");

So in your case it would be: 

ruleFlowId.equals("test") == true

It's because Strings are objects, and ==  tests to see if the String is
literally the same object as the other String, not just a String with the
same value. != works because they aren't the same object.

Hope that works,
Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Can-get-not-equal-to-work-but-not-equal-in-LHS-tp4022074p4022076.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] Can get "not equal" (!=) to work but not "equal" (==) in LHS

2013-02-06 Thread rjr201
Ah right, that's good to know. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Can-get-not-equal-to-work-but-not-equal-in-LHS-tp4022074p4022087.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] Uploading JAR using REST

2013-02-07 Thread rjr201
Hi, 

I've successfully uploaded a JAR file using the rest api. I can see it under
the model tab of a package in Guvnor. However, when I go to create a rule
using the Guided Editor it tells me that no model has been uploaded.

Does anyone have any ideas why this happens and how to go about solving it?

As always, thanks for any help in advance. 

Rich. 






--
View this message in context: 
http://drools.46999.n3.nabble.com/Uploading-JAR-using-REST-tp4022115.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] Uploading JAR using REST

2013-02-07 Thread rjr201
Since posting this, I've realised that if I go to the Edit tab on the Package
page and click the green cross on imported types I can see the objects in my
JAR and import them. The rules can then use them fine. When uploading a JAR
file by hand there is no need to do this import step. 

Do you know of a way programmatically that I can do this? 

Restarting doesn't make any difference.

Thanks again for your help. 

Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Uploading-JAR-using-REST-tp4022115p4022117.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] Planner: What is a good example/algo to chain entities?

2013-02-08 Thread rjr201
It sounds like a really interesting task that you are working on. But I've
read this through a couple of times and I'm afraid (and I suspect I'm not
alone) I don't really understand a lot of the terms you use. 


mvermand wrote
> The Tasks do not have to be grouped like a pillar but more like an
> accordion.







--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Planner-What-is-a-good-example-algo-to-chain-entities-tp4022083p4022153.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] Uploading JAR using REST

2013-02-08 Thread rjr201
Thanks for your help. I'll take a look at that. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Uploading-JAR-using-REST-tp4022115p4022154.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] Uploading JAR using REST

2013-02-11 Thread rjr201
Ok, so I have this working now. You have to push a string of the form: 

import ObjectName
import anotherObjectName

To:

http://127.0.0.1:8080/guvnor-5.5.0.Final-jboss-as-7.0/org.drools.guvnor.Guvnor/webdav/packages/{packageName}/drools

The following code worked for me: 

String guvnorExtension =
"guvnor-5.5.0.Final-jboss-as-7.0/org.drools.guvnor.Guvnor/"
final WebClient client = WebClient.create("localhost:8080/", "auth", "auth",
null);
client.path(guvnorExtension + "webdav/packages/packagename/drools");
client.accept("text/plaintext");
String classImport = "import ObjectName\nimport AnotherObjectName";
Response response = client.put(classImport);

On first inspection everything else seems to be still working ok after doing
this. Will report back if I find anything else has broken as a result. 

Cheers,
Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Uploading-JAR-using-REST-tp4022115p4022202.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] DSL Bug?

2013-02-11 Thread rjr201
I've had the following problem when creating a DSL. Not sure if it's a bug,
but it confused me for a good 40 minutes so thought I'd mention it here in
case others have the same problem.. 

If I create a DSL like this: 

[when]There is a fact {fact_name}{fact_label}={fact_label}:{fact_name}()

And create a rule in the guided editor that has Object as the {fact_name}
and $obj as the {fact_label} I get: 

1.  |   rule "rule"
2.  |   dialect "mvel"
3.  |   when
4.  |   Object$obj:()
5.  |   then
6.  |   end

as the source.

At first I thought it was to do with putting quotation marks around the
{}'s. But I've since found that if I put a space between {fact_name} and
{fact_label} I get the expected result of: 

1.  |   rule "rule"
2.  |   dialect "mvel"
3.  |   when
4.  |   $obj:Object()
5.  |   then
6.  |   end

Again, sorry if this is down to my limited understanding of DSLs. Any
further insights into why this happens or any other quirks of DSLs would be
greatly appreciated as I'm going to be spending a lot of time with them in
the not too distant future.. 

Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/DSL-Bug-tp4022209.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] DSL Bug?

2013-02-11 Thread rjr201
Yes, that's a good point. I guess the confusion arises in the way the guided
editor creates two separate input boxes, one for the fact_name and one for
the fact_label. I didn't think about the DSRL that the Guided Editor is
(presumably) using behind the scenes. I guess the DSRL has no concept of the
input boxes the user used to input the values. It just takes them and
inserts them blindly into the DSRL. 

Thanks for your help. 

Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/DSL-Bug-tp4022209p4022217.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] DSL Bug?

2013-02-11 Thread rjr201
That's very good advice. Thank-you. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/DSL-Bug-tp4022209p400.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] Mapping to '==' in enumeration

2013-02-12 Thread rjr201
Hi,

I've created an enumeration in Guvnor like so:

'Object.operator[]': ['== = equals', '!= = does not equal', '< = less than',
'> = greater than']

The less than and greater than map fine. But the equals and does not equal
don't. I realise that I need to escape the first two = signs, but can't find
a way to do it. 

'\=\= = equals' doesn't work. Anyone got any ideas?

Sorry if this is something really easy to solve, but I can't work it out. 

(also I realise that I could just have a drop down box with the mathematical
symbols in and not worry about mapping it to english, but apparently that
would be too technical for non-technical users ) 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Mapping-to-in-enumeration-tp4022245.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] Mapping to '==' in enumeration

2013-02-12 Thread rjr201
Ah right. I should have guessed that. Thank-you.

I'm creating a language that is pure dsl and doesn't require the user to
reference the object model classes directly. We're only in the very early
development experimental stages at the moment, so this may change. I'm doing
this because there was concern that the rules engine would be too technical,
so we want the rules to be as simple as possible for the user to add
conditions to. 

Thanks again for your help. 

Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Mapping-to-in-enumeration-tp4022245p4022248.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] RemoveIdentities with KnowledgeAgent

2013-02-19 Thread rjr201
Hi,

I'm using a KnowledgeAgent to create a KnowledgeBase. However, I need to
turn off Identities. In previous projects (not using knowledgeAgent) I've
done: 

RuleBaseConfiguration conf = new RuleBaseConfiguration();
conf.setRemoveIdentities( true );
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(conf);

I'm sure there is a very similar approach with the KAgent, but I can't seem
work out what it is. I thought maybe something like this: 

KnowledgeAgentConfiguration conf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
conf.setProperty("drools.removeIdentities", "true");
kagent = KnowledgeAgentFactory.newKnowledgeAgent("MyAgent", conf);

But that doesn't seem to work. Any help with this would be greatly
appreciated. 

Regards,
Rich. 





--
View this message in context: 
http://drools.46999.n3.nabble.com/RemoveIdentities-with-KnowledgeAgent-tp4022444.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 get the pkg from guvnor by KnowledgeAgent?

2013-02-19 Thread rjr201
You need to add authentication in the ChangeSet.xml. Unfortunately the one
that Guvnor creates for you doesn't include it. So you need to download the
ChangeSet.xml into your project and load it using .newClassPathResource or
.newFileResource instead. 

You also need to add authentication to the ChangeSet.xml like so:



 basicAuthentication="enabled" username="admin"
password="admin"*/>



Hope that works. 
Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/how-to-get-the-pkg-from-guvnor-by-KnowledgeAgent-tp4022417p4022446.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] RemoveIdentities with KnowledgeAgent

2013-02-19 Thread rjr201
In case anyone else has this problem, I've managed to do it using System
properties:

System.setProperty("drools.removeIdentities", "true");

But ideally I'd still like to be able to do it via the Kagent if possible.. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/RemoveIdentities-with-KnowledgeAgent-tp4022444p4022452.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Guvnor JBoss 7 Authentication

2013-02-27 Thread rjr201
Hi,

I'm having some problems getting user authentication working with Guvnor on
JBoss AS 7.

I have this in beans.xml: 





  


   
jaasAuthenticator



  

  


other
  


  
  
  

   
true
  

And I've created the following files on Guvnors class path:

roles.properties: 

admin=admin 

users.properties 

admin=admin 

This initially gave me a '401 This user has no permissions setup.' error. So
I followed this post: 

http://drools.46999.n3.nabble.com/How-configure-Guvnor-5-4-JAAS-with-jboss-7-0-2-td4020424.html#a4020854

And changed the /SecurityServiceImpl.java file as suggested (not sure if
this was the right thing to do or not, but it got rid of the error). However
now it gives me "incorrect username/password" regardless of what I enter. 

Has anyone had any success with this, or can see where I'm going wrong? I
feel like I'm really close but can't work out this last step. 

As always, thanks for any help anyone can give. 

Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-JBoss-7-Authentication-tp4022620.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Guvnor Authentication

2013-03-04 Thread rjr201
Hi,

I'm still struggling to get authentication to work with Guvnor 5.5 on JBoss
7. Can anyone confirm that the fix described here is still necessary/correct
with Guvnor 5.5? 

http://drools.46999.n3.nabble.com/How-configure-Guvnor-5-4-JAAS-with-jboss-7-0-2-td4020424.html

It feels strange that I have to change the source code for something so
common as authentication. Any insight anyone can give me on doing this would
be really helpful. 

Thanks in advance,
Rich. 



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


Re: [rules-users] Guvnor Authentication

2013-03-05 Thread rjr201
Thanks for your reply. I'll take a look at that. Do you know when 5.6 will be
released?



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


Re: [rules-users] Guvnor Authentication

2013-03-07 Thread rjr201
Thanks for that. We'll take a look and let you know how we get on. 

Cheers,
Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-Authentication-tp4022675p4022726.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] Pass Parameter to drools file dynamically

2013-03-14 Thread rjr201
You could create a Fact called MessageType that contains a string
representing the type, and insert that into your session. You'd then adjust
your rule like this: 

rule"Test" 
when 
MessageType($messageType : type)
message:Message(type==$messageType) 
then 
System.out.println("Hello Richa."); 
end 





--
View this message in context: 
http://drools.46999.n3.nabble.com/Pass-Parameter-to-drools-file-dynamically-tp4022820p4022821.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] [DSL] Map unknow in rule

2013-03-14 Thread rjr201
You need to import the Map object at the top of your rules file as you would
in Java.

Like this - import java.util.Map;



--
View this message in context: 
http://drools.46999.n3.nabble.com/DSL-Map-unknow-in-rule-tp4022819p4022822.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] Rename Guvnor rule name using REST

2013-03-14 Thread rjr201
You'd probably have to check out the asset's source using:

/packages/{packageName}/assets/{assetName}/source

And then create a new asset with a different name but the same source using: 

/packages/{packageName}/assets

Details are here:

http://docs.jboss.org/drools/release/5.3.0.Beta1/drools-guvnor-docs/html/ch09.html#d0e1695

  



--
View this message in context: 
http://drools.46999.n3.nabble.com/Rename-Guvnor-rule-name-using-REST-tp4022823p4022824.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] Pass Parameter to drools file dynamically

2013-03-14 Thread rjr201
What does your declaration of Message look like?

It should look something like this: 

public class Message {
String type; 

public Message() {}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

}

Your not going to get very far without understanding the differences between
facts and globals. I recommend looking at some tutorials. 





--
View this message in context: 
http://drools.46999.n3.nabble.com/Pass-Parameter-to-drools-file-dynamically-tp4022820p4022829.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] Pass Parameter to drools file dynamically

2013-03-15 Thread rjr201
I'm a bit confused as to how this relates to your previous post. Where are
you getting the exception?

Something like this would work: 

 File dsl = new File("Path of your rule");
 KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
 kbuilder.add(ResourceFactory.newFileResource(dsl), ResourceType.DRL); 
 
 KnowledgeBase kbase = kbuilder.newKnowledgeBase();
 StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession();

 FactType airlineType = kbase.getFactType("droolshelloworld", "Airline"); 
 Object ob = airlineType.newInstance(); 
 airlineType.set(ob, "name", "//Airline"); 

 session.insert(ob); 
 session.fireAllRules(); 

And your rule looks like this: 

declare Airline 
 name:String 
end 

rule"Test"
 
when 
message:Airline(name=="//Airline") 
then 
System.out.println("Hello Richa."); 
end

As I said in my previous post. You really need to read some tutorials on
this. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Pass-Parameter-to-drools-file-dynamically-tp4022820p4022835.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] Embedding Guvnor

2013-03-20 Thread rjr201
I'm trying to embed the guided editor into a website. I've had this working
previously, but for some reason it's now throwing me an error. 

I'm using a clean install of guvnor 5.5.Final on JBoss AS 7.1.1.Final. I
create the default mortgages package, and then call the following url:  

http://127.0.0.1:8080/guvnor/org.drools.guvnor.Guvnor/standaloneEditorServlet/assetsUUID=968c9b3c-bc19-40ba-bb38-44435956ccee&client=oryx

I then get this error: 

This webpage has a redirect loop
The webpage at
http://127.0.0.1:8080/guvnor/org.drools.guvnor.Guvnor/standaloneEditorServlet/StandaloneEditor.html?pUUID=4576112f-5843-4f16-baee-b9719b993ba3&pUUID=ddbe98b0-b2b3-4e77-b88b-823d7278f061&pUUID=0a982163-21fa-4aff-a6a3-a39d16228ff7&pUUID=3260334e-6a49-42d5-929d-2d16ef1832d7&pUUID=b5c4c1fc-d6af-48a4-8316-d6a98a2ec8c6&pUUID=b078bb7b-b6a7-4413-a5bf-926322716676&pUUID=c70869e5-eb6a-42a9-9259-a09769c4079a&pUUID=7fd4afe0-ede3-4167-a0eb-58869483cf6a&pUUID=870e42eb-c9e4-4de4-ac87-b70eccdcc7a2&pUUID=dc94a641-77e6-41db-bf30-f5325f4167de&pUUID=84582103-11d1-49e2-9cc1-c42f25b09645&pUUID=254d00db-a7f2-4a4f-853e-3b989457050d&pUUID=66082352-9c02-4eef-8d41-80ad75b7d075&pUUID=00f95322-c58d-4a79-9300-4f9f7769bca4&pUUID=f2b755a4-8594-476a-854e-bd29f24b0a9f&pUUID=a7c26fe9-6169-4bdd-9a2d-4ab3ecf39334&pUUID=ff589a05-21e6-4871-984b-975b378ef7a8&pUUID=a5b620ba-f00c-4891-a688-2ba4eb3307db&pUUID=d431c15c-3c19-4baa-9dc3-4dafc01c0785&pUUID=8f0f80e4-9696-48f7-971e-db2ec1c53616&pUUID=352649db-4369-4722-8b0d!
 -234acb3275b8&null

Anyone have any idea what's going on here? Like I say, I've had this working
before so it's probably something I'm doing wrong.. but I can't work it out. 

Thanks in advance. 
Rich. 




--
View this message in context: 
http://drools.46999.n3.nabble.com/Embedding-Guvnor-tp4022920.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] Embedding Guvnor

2013-03-20 Thread rjr201
Thanks for your response. I think you're right. The problem I have is that
even when I paste the url into the browser I get the error, suggesting it's
either something to do with the URL or Guvnor itself. I'll keep playing with
it.. 




--
View this message in context: 
http://drools.46999.n3.nabble.com/Embedding-Guvnor-tp4022920p4022928.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] Embedding Guvnor

2013-03-20 Thread rjr201
Right, solved this. It's because I was using a / where there should have been
a ?

http://127.0.0.1:8080/guvnor/org.drools.guvnor.Guvnor/standaloneEditorServlet?assetsUUID=968c9b3c-bc19-40ba-bb38-44435956ccee&client=oryx



--
View this message in context: 
http://drools.46999.n3.nabble.com/Embedding-Guvnor-tp4022920p4022933.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] Upload POJO model, no facts are imported

2013-03-28 Thread rjr201
When you upload the Jar file you have to then go to 'File'->'Save' and check
it in. If the objects still don't appear, try going to the edit tab on the
package and looking at the list under "Configuration: Imported types". If
there is nothing in this list, click on the green cross and see if you can
add your objects from there. If you can't then there is probably something
wrong with the Jar file you've uploaded. Make sure that's it's a non
compressed jar file, this has caused me problems in the past.

Hope that helps,
Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Upload-POJO-model-no-facts-are-imported-tp4023074p4023095.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] "drools" key word

2013-05-03 Thread rjr201
I was looking for a way to get a rule's name within the 'then' condition of
the rule.. found an old post on another forum that recommended this (which
works):

drools.getRule().getName()

My question is, what is this 'drools' keyword? could anyone point me to
documentation that outlines what else can be done with it.

Thanks in advance.
Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-key-word-tp4023662.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" key word

2013-05-03 Thread rjr201
That's exactly what I needed. Thanks. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-key-word-tp4023662p4023665.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 dynamic remove or add the rules

2013-05-22 Thread rjr201
You need to pass an Agenda Filter to the runRules() method that will filter
which rules are allowed to run.

For example.. 

public class MyAgendaFilter implements AgendaFilter {
/** List of rule names to be allowed to fired*/
ArrayList rulesToFire;

public MyAgendaFilter() {
rulesToFire = new ArrayList();
}

/**
 * Adds a rule to list of rules to be allowed to fire
 * @param name Name of rule to be fired
 */
public void addRuleToFire(String name) {
rulesToFire.add(name);
}

@Override
public boolean accept(Activation activation) {
if (rulesToFire.contains(activation.getRule().getName())) { 
return true;
} else {
return false;   
}
}
}

This can then be used as follows:

AgendaFilter filter = new MyAgendaFilter();
filter.addRuleToFire("Rule Name");
StatefulKnowledgeSession knowledgeSession =
kbase.newStatefulKnowledgeSession();
knowledgeSession.fireAllRules(filter);



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-dynamic-remove-or-add-the-rules-tp4023919p4023925.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] migrating from 5.5.x to 6.0.0

2013-05-28 Thread rjr201
I believe it's kieBase -
http://docs.jboss.org/drools/release/6.0.0.Beta1/kie-api-javadoc/org/kie/api/KieBase.html

In Drools 6 the word 'knowledge' has been replaced by 'kie' (Knowledge Is
Everything).



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-migrating-from-5-5-x-to-6-0-0-tp4023995p4023996.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor Rest API for uploading model

2013-05-29 Thread rjr201
I think this might be the same problem I was having..
http://drools.46999.n3.nabble.com/Uploading-JAR-using-REST-td4022115.html#a4022202



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-Rest-API-for-uploading-model-tp4024007p4024010.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor and DSL i18n

2013-05-30 Thread rjr201
I think first question to ask is, will drools 6 still include DSLs? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-and-DSL-i18n-tp4024032p4024035.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor and DSL i18n

2013-05-31 Thread rjr201
I had a very brief conversation with Mark Proctor at the recent London JBug
meetup about the guided editor in Uberfire. I could have misunderstood, but
I thought he said that DSLs won't be supported in the new Uberfire guided
editor. It would be great if I could get confirmation of the role of DSLs in
Drools 6 / Uberfire as it's quite crucial to my current project.

Cheers,
Rich.  




--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-and-DSL-i18n-tp4024032p4024050.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] Decision tree, Is this scenario possible in Drools 5.x, need to fire a new question based on the answer of previous

2013-06-07 Thread rjr201
I don't think it'd be too hard to model a decision tree in a .drl file. 

You'd need a rule for each node/transition in your graph. Something like: 

WHEN 
   $cn : CurrentNode( Node(name == "Is the dispute related to Unauthorised")
)
   $d : Decision ( answer = "Yes" )
   $nextNode : Node (name == "CM disputes the charge..")
THEN 
   retract $cn
   retract $d
   insert new CurrentNode($nextNode)
END

Then create rules that halt at nodes that have no transitions leading out of
them (end nodes).

You could then start it as a statefull session, and input the decisions one
by one until an end node is reached. 

I've done that kind of thing before and it's not been too cumbersome. But
then I don't know the context of what you are doing.. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Decision-tree-Is-this-scenario-possible-in-Drools-5-x-need-to-fire-a-new-question-based-on-the-answes-tp4024193p4024198.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Guvnor Rule Validation

2013-06-10 Thread rjr201
I'm creating a system which embeds the Guvnor Guided Editor and uses the REST
API to allow the user to edit and create rules. 

I can't trust the user to create syntactically correct rules. If they do
create an invalid rule then the whole package of rules will fail to compile.
I need to find a way to detect that a individual rule has broken, and point
the user to that rule. So they don't just sit there not understanding why
it's not working. 

I can see that when using standalone Guvnor this wouldn't be a problem, as
the user would be able to see that the rule has a red cross next to it
meaning something is wrong with that rule. 

Has anyone else had experience doing this? Is there a way to get the UUID of
the specific rule that is causing the package not to compile?

I've had thoughts about putting each rule in it's own package, and then
creating a layer in my code to hide this from the user. But that seems like
a hack.. and I suspect it would drastically effect the performance.. 

As always, thanks any help/advice anyone can give. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-Rule-Validation-tp4024218.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] Monitoring sensor parameter change

2013-06-11 Thread rjr201
If I understand your question right, you could create a class called
LastReading( SensorRead() ) and then your rules would look something like: 

rule 1 //check to see if the increase is > 2
when
   $last : LastReading( SensorRead($lastPower : power) )
   SensorRead( $lastPower - power > 2)
then
   System.out.println("Power increased more than 2")
end

rule2 //update which sensor read is the lastest reading
salience 100
when
   $last : LastReading( )
   $new : SensorRead()
then
   retract($last)
   insert(new LastReading($new))
end



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Monitoring-sensor-parameter-change-tp4024242p4024243.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor Rule Validation

2013-06-12 Thread rjr201
Thank you, I'll have a look at the codes.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-Rule-Validation-tp4024218p4024265.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 import drl files to Guvnor for graphical rules

2013-06-18 Thread rjr201
As far as I'm aware there is no way to automatically upload .drl files into
the guided editor format (.brl). This is something that I really need to be
able to do as well. However, I have heard that this will be possible in the
upcoming UberFire application. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-import-drl-files-to-Guvnor-for-graphical-rules-tp4024347p4024354.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 import drl files to Guvnor for graphical rules

2013-06-18 Thread rjr201
It's the converting from .drl to .brl that could be tricky. I guess it
depends what your rules look like. It was a while ago when I looked at it,
but it didn't seem a trivial task to convert from .drl to .brl. But do let
me know how you get on.. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-import-drl-files-to-Guvnor-for-graphical-rules-tp4024347p4024359.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] Identity Mode?

2013-06-20 Thread rjr201
If I have a rule such as:

When 
   Person()
   Person()
Then
   System.out.println("There are two people!")
End

I only want this to fire if there are two (or more) Person objects inserted
into the session, however as default drools will fire even when there is
just one Person object inserted (i.e. both Person patterns get matched to
the same fact).

I seem to remember there is a flag I can set that swaps between these two
types of behavior, and seem to remember it's to do with Identity/Equality
mode. However, I can't remember how or where to do this. 

Any help on this would be greatly appreciated..

Cheers,
Rich. 

P.S I realise that I could add constraints to the patterns to explicitly
check that the facts aren't the same.. however I'd rather not have to do
that as I'm trying to make it as simple as possible for users to create
rules..



--
View this message in context: 
http://drools.46999.n3.nabble.com/Identity-Mode-tp4024428.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] RE : Identity Mode?

2013-06-20 Thread rjr201
I've just found an old forum post of my own that solves this problem..
http://drools.46999.n3.nabble.com/RemoveIdentities-with-KnowledgeAgent-td4022444.html#a4022452

(I knew I'd come up against this before!)

If I do (before creating the session): 

System.setProperty("drools.removeIdentities", "true");

Then the rule won't fire. But..

System.setProperty("drools.removeIdentities", "false");

And it does. Not sure if this is the *right* way to do it.. but it works. 





--
View this message in context: 
http://drools.46999.n3.nabble.com/Identity-Mode-tp4024428p4024430.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] Can we hold reference to a function return type

2013-06-21 Thread rjr201
Could you post the complete code of what you are trying to do?



--
View this message in context: 
http://drools.46999.n3.nabble.com/Can-we-hold-reference-to-a-function-return-type-tp4024453p4024459.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] What is ->?

2013-06-26 Thread rjr201
Could you give an example?



--
View this message in context: 
http://drools.46999.n3.nabble.com/What-is-tp4024549p4024556.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] Spam

2013-07-01 Thread rjr201
Is there anything we can do about all the spam that's been posted on this
forum? It's starting to get unusable.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Spam-tp4024684.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] Spam

2013-07-01 Thread rjr201
Yes, sorry I should have been more specific. I mean the nabble forum here:
http://drools.46999.n3.nabble.com/



--
View this message in context: 
http://drools.46999.n3.nabble.com/Spam-tp4024684p4024687.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] Spam

2013-07-09 Thread rjr201
Sorry to keep going on about this.. I realise that the nabble interface is
only a mirror of the mailing list, but currently it's completely swamped by
spam. I'm sure a lot of people using drools for the first time come to this
forum for help/guidance, and it's not very inspiring when there is roughly 1
real post to every 8 spam posts.  

I'm guessing it's not an easy task just to filter it out, but is there a way
that I can manually delete it? I check this forums most mornings, and it
would take me very little time to remove it.. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Spam-tp4024841.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] Spam

2013-07-09 Thread rjr201
It's probably just me.. but I get a window that says "loading.." which just
sits there.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Spam-tp4024841p4024843.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] Spam

2013-07-09 Thread rjr201
I agree that a question and answer style approach would definitely be worth
investigating. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Spam-tp4024841p4024846.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] Deploying Guvnor 5.5.1 in JBoss 7.1.1.Final

2013-07-15 Thread rjr201
Hi,

I've just checked out and successfully compiled:
https://github.com/droolsjbpm/guvnor/tree/5.5.x

I've tried to deploy this in jboss-as-7.1.1.Final but got the following
error:

16:48:14,132 ERROR [org.apache.catalina.core.StandardContext] (MSC service
thread 1-4) Context [/guvnor-webapp-drools-5.5.1-SNAPSHOT] startup failed
due to previous errors: java.lang.IllegalArgumentException: Duplicate
context initialization parameter resteasy.injector.factory
at
org.apache.catalina.core.StandardContext.addParameter(StandardContext.java:2186)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.deployment.JBossContextConfig.processWebMetaData(JBossContextConfig.java:261)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.as.web.deployment.JBossContextConfig.applicationWebConfig(JBossContextConfig.java:169)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at 
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:417)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:182)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:162)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3790)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_13]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_13]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]

16:48:14,142 ERROR [org.apache.catalina.core.StandardContext] (MSC service
thread 1-4) Context [/guvnor-webapp-drools-5.5.1-SNAPSHOT] startup failed
due to previous errors
16:48:14,149 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4)
MSC1: Failed to start service
jboss.web.deployment.default-host."/guvnor-webapp-drools-5.5.1-SNAPSHOT":
org.jboss.msc.service.StartException in service
jboss.web.deployment.default-host."/guvnor-webapp-drools-5.5.1-SNAPSHOT":
JBAS018040: Failed to start context
at
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_13]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_13]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]

16:48:14,157 INFO  [org.jboss.as] (MSC service thread 1-4) JBAS015951: Admin
console listening on http://127.0.0.1:9990
16:48:14,158 ERROR [org.jboss.as] (MSC service thread 1-4) JBAS015875: JBoss
AS 7.1.1.Final "Brontes" started (with errors) in 13913ms - Started 295 of
374 services (2 services failed or missing dependencies, 76 services are
passive or on-demand)
16:48:14,358 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2)
JBAS015870: Deploy of deployment "guvnor-webapp-drools-5.5.1-SNAPSHOT.war"
was rolled back with failure message {"JBAS014671: Failed services" =>
{"jboss.web.deployment.default-host.\"/guvnor-webapp-drools-5.5.1-SNAPSHOT\""
=> "org.jboss.msc.service.StartException in service
jboss.web.deployment.default-host.\"/guvnor-webapp-drools-5.5.1-SNAPSHOT\":
JBAS018040: Failed to start context"}}
16:48:14,384 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3)
JBAS016009: Stopping weld service for deployment
guvnor-webapp-drools-5.5.1-SNAPSHOT.war
16:48:17,110 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1)
JBAS015877: Stopped deployment guvnor-webapp-drools-5.5.1-SNAPSHOT.war in
2745ms
16:48:17,111 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2)
JBAS014774: Service status report
JBAS014777:   Services which failed to start:  service
jboss.web.deployment.default-host."/guvnor-webapp-drools-5.5.1-SNAPSHOT":
org.jboss.msc.service.StartException in service
jboss.web.deployment.default-host."/guvnor-webapp-drools-5.5.1-SNAPSHOT":
JBAS018040: Failed to start context

16:48:17,113 ERROR [org.jboss.as.server.deployment.scanner]
(DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed 

Re: [rules-users] Deploying Guvnor 5.5.1 in JBoss 7.1.1.Final

2013-07-17 Thread rjr201
Hi,

Thanks for your advice, but I need to get 5.5.1 working rather than 5.5.0 as
it has some fixes for IE8.

However, I did manage to get the 5.5.1 working but there still seems to be
problems with IE8.. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Deploying-Guvnor-5-5-1-in-JBoss-7-1-1-Final-tp4024917p4024961.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] help on drools guvnor

2013-07-17 Thread rjr201
What are your rules?



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-help-on-drools-guvnor-tp4024975p4024977.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] rules-users Digest, Vol 80, Issue 33 - help on drools guvnor

2013-07-17 Thread rjr201
Why have you declared the class in a POJO and in the .DRL format?

I'm assuming you've uploaded the POJO into guvnor, and the used that to
declare your rules? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Re-rules-users-rules-users-Digest-Vol-80-Issue-33-help-on-drools-guvnor-tp4024979p4024980.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] Internet Explorer Compatibility

2013-07-17 Thread rjr201
Hi,

I'm working for a client who wishes to use Guvnor with Internet Explorer. 

I've tried Guvnor 5.5.0.Final with IE8 and IE9. However, I get an error when
trying to access a rule in the guided editor. 

I read in another post
(http://drools.46999.n3.nabble.com/guvnor-5-5-problems-on-Internet-Explorer-td4022207.html)
that there are problems with 5.5.0 in IE, that may have been fixed in the
current 5.5.x branch. 

I have built the latest code on the branch, but seem to have even more
problems (it doesn't even let me get to the initial Guvnor landing page).

Does anyone have any experience/insight in getting Guvnor working in IE? Or
at least know what version of Guvnor does work in IE? Or just any advice on
this issue at all I would be grateful.. 

Thanks in advance,
Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Internet-Explorer-Compatibility-tp4024985.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 check HashSet size in drool

2013-07-18 Thread rjr201
The same way you'd do it in Java.



--
View this message in context: 
http://drools.46999.n3.nabble.com/how-to-check-HashSet-size-in-drool-tp4025036p4025039.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 check HashSet size in drool

2013-07-18 Thread rjr201
I think this would work:

rule "geo_map2" 

when 
Creative($id : id, geo_type == 1, geo_mapList.size() == 0)  
  
then 
System.out.println("geo_map2 fail for  CreativeId--"+$id ); 
end 



--
View this message in context: 
http://drools.46999.n3.nabble.com/how-to-check-HashSet-size-in-drool-tp4025036p4025044.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 get version of an asset for perticular Package version using RESTEasy

2013-07-24 Thread rjr201
The documentation says it's something like this: 

http://localhost:8080/drools-guvnor/rest/packages/{packageName}/assets/{assetName}/versions/{version}



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-get-version-of-an-asset-for-perticular-Package-version-using-RESTEasy-tp4025121p4025122.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 improve performance with large number of rules and facts ?

2013-08-05 Thread rjr201
It's very hard to give advice without seeing the rules that you are using.
Could you give us a sample of your rules? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-improve-performance-with-large-number-of-rules-and-facts-tp4025324p4025325.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 improve performance with large number of rules and facts ?

2013-08-05 Thread rjr201
Are you sure they'll only "fire once for all the objects"? What are the facts
you are inserting?



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-improve-performance-with-large-number-of-rules-and-facts-tp4025324p4025328.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 time to insert facts

2013-08-05 Thread rjr201
That doesn't sound normal. Could you post your rules and code?



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Drools-time-to-insert-facts-tp4025343p4025344.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 time to insert facts

2013-08-06 Thread rjr201
hey,

Sorry I'm limited as to what I can download on this machine so will have to
look at your code later. Unless you just want to copy and paste it here.. 

Wolfgang - I don't think he is trying to "show" anything. Reading his post
it seems more like he wants someone to give him an insight into why it's
behaving the way it is. 




--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Drools-time-to-insert-facts-tp4025343p4025369.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor: test scenario executes 100000 times

2013-09-05 Thread rjr201
Could you post your rule and the code you are using to run it?



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-test-scenario-executes-10-times-tp4025816p4025820.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Guvnor: test scenario executes 100000 times

2013-09-05 Thread rjr201
Please post your code so we can see what you are trying to do. It is very
difficult to help you if we can't see what you are doing. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-test-scenario-executes-10-times-tp4025816p4025822.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] Indicating "used" rules

2013-09-23 Thread rjr201
Could you post an example rule and some code that uses it? It'll make it
easier to understand what you're trying to achieve.



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Indicating-used-rules-tp4026093p4026095.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] Is this forum still a live ??? it is not encouraging to use drools :(

2013-10-02 Thread rjr201
This forum is still alive. It's just that the nabble interface gets swamped
with spam, making it hard to see the real posts. 

You could try gmanes interface instead:
http://www.mail-archive.com/rules-dev@lists.jboss.org/



--
View this message in context: 
http://drools.46999.n3.nabble.com/Is-this-forum-still-a-live-it-is-not-encouraging-to-use-drools-tp4026200p4026233.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 does drools provides an explanation of how the solution was arrived?

2013-10-04 Thread rjr201
This is a statement about the nature of rules engines in general. Rules
engines are made up of human readable rules, as opposed to say a neural
network where the knowledge isn't explicitly represented (it's a big black
box of maths). A rules engine is symbolic, a neural network sub-symbolic. A
neural network can give you an answer, but not a justification of why.
People like rules engines because (when done properly) they can see why it
has given the answer it has given.

To answer your question, to get a explanation of what the rules engine did,
you could insert a logging object as a global into your rules session and
then add a log statement in the conclusion of each rule. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-does-drools-provides-an-explanation-of-how-the-solution-was-arrived-tp4026253p4026263.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] use a boolean returned type function in "when", doesn't work, why?

2013-10-11 Thread rjr201
Do you need to do eval( isNotNull("")) maybe? 




--
View this message in context: 
http://drools.46999.n3.nabble.com/use-a-boolean-returned-type-function-in-when-doesn-t-work-why-tp4026339p4026340.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 does drools provides an explanation of how the solution was arrived?

2013-10-21 Thread rjr201
lalit2583 wrote
> Thanks Guys,
> But I would like to further know as to how the solution was arrived and
> why each "decision" along the way was made.
> 
> using kcontext I can only identify the rule and matched objects. 
> 
> Regards,
> Lalit.

Isn't knowing the rule and the objects that caused it to fire the equivalent
of knowing why a decision was made? If not, could you give an example?



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-does-drools-provides-an-explanation-of-how-the-solution-was-arrived-tp4026253p4026439.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 use global hashmap in drools

2013-10-30 Thread rjr201
Hi, you need to be clearer what it is you are trying to do. That function is
very bizarre. 

It's called *get *value, but you pass it two values and then *put *them into
a hashmap. You also say it's going to return a string, but then return an
integer. The size of that hash map is always going to be 1. 

What are your rules trying to do? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-use-global-hashmap-in-drools-tp4026555p4026556.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] drools.package ResourceType?

2013-12-18 Thread rjr201
Hi,

I'm embedding Guvnor using the BRL Edition Mode. I'm then grabbing the BRL
code and adding it to the KnowledgeBuilder. I'm also loading the object
model jar using a class loader. This works fine if all the classes the rule
is using are at the root of the object model jar. 

My question is, can I add the class imports (what the package.drools file
does in guvnor) programmatically using KnowledgeBuilder, so my object model
doesn't have to be flat? I was hoping there would be a ResourceType for
drools.package, so I could do something like kbuilder.add("import
package.classname", ResourceType.?), but can't seem to find one. 

Hopefully that makes some kind of sense to someone.. 

Any help on this would be greatly appreciated. 
Rich. 




--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345.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.package ResourceType?

2013-12-18 Thread rjr201
Hi Mantis, thanks for your response. 

I'm using kbuilder.add(ruleResource, ResourceType.BRL);

The BRL source code I grabbed from the embedded guvnor window doesn't have
explicit path names on the classes that it's using. For example, if the
class was packagename.Person it just has Person. Which means it tells me it
doesn't recognise the class when I add it to class builder. I was wondering
if there was a way round this? If not, it's not necessarily the end of the
world to have to put everything in the root of the objectmodel jar.

PS I realise that messing around with BRL stuff outside of Guvnor is not a
nice way to have to do things, but I've got my hands tied a bit with what I
can do (I'd much rather be using all the cool stuff I've been reading about
in 6!)



--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345p4027348.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.package ResourceType?

2013-12-18 Thread rjr201
Thanks very much for both your responses.

I've realised that I can add a DRL file to the kbuilder that just has the
imports in it. These imports are then picked up by any BRL resources that
are added. It's a bit of a hack, but this seems to be working. 

Thanks again for your responses. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345p4027351.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 performance

2013-12-19 Thread rjr201
tsi42013 wrote
> "If drools is set to read 1000 events per second, it will lose a few in
> the way"

Where did you read that?



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-performance-tp4027355p4027366.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] Embedding Guvnor 6 Guided Editor

2014-02-10 Thread rjr201
Hi, 

I'm looking to upgrade to the new kie workbench 6.. i really need to be able
to embed the guided editor within my application. I've done this previously
using the iframe approach. I can't seem to find any documentation on how to
do this in the latest release. Sorry if i've overlooked any documentation on
this. Any advice would be greatly appreciated.. 

Cheers.
Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Embedding-Guvnor-6-Guided-Editor-tp4028045.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] irrational behaviour by drools engine

2014-02-14 Thread rjr201
Hi,

Can you give a bit of a broader explanation of what it is your rule is
trying to achieve? I suspect there is a simpler, way of doing what you want
without having to resort to using eval. 

For example, EncapsulatingObject(encapsulationMap[$key+""] !=null) is very
confusing.

Please explain your requirement in detail. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/irrational-behaviour-by-drools-engine-tp4028104p4028113.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] irrational behaviour by drools engine

2014-02-14 Thread rjr201
I still don't fully understand what you are trying to do, but could you maybe
try inserting each object in your hashmap as a fact rather than having a
global hashmap. Your rule would then look something like:

WHEN
   EncapsulatingObject($id : id)
   EncapsulatingObject(id == $id)
THEN
   Do something.. 
END

This rule simply checks if there are two encapsulatingObjects with the same
id. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/irrational-behaviour-by-drools-engine-tp4028104p4028116.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] irrational behaviour by drools engine

2014-02-14 Thread rjr201
Yeah, sorry I'm too used to having drools.removeIdentities set to true.
Otherwise yes, you'd need to put a check in to ensure it's not the same
fact. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/irrational-behaviour-by-drools-engine-tp4028104p4028120.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] irrational behaviour by drools engine

2014-02-14 Thread rjr201
Ok, I think I'm starting to understand. Could you create another fact object
that is a pair of encapsulating objects, one that is inserted, and another
that you retrieve from your global?

It would look something like: 

public class EncapsulatingObjectPair {
   EncapsulatingObject a;
   EncapsulatingObject b;

//getters setters etc..

}

And then you'd have a rule that looks like this: 

WHEN 
   $object : EncapsulatingObject($key : id)
THEN
   insert new EncapsulatingObjectPair($object,
encapsulationMap.get($key+""));
END

And a second rule that looks something like:

WHEN 
   EncapsulatingObjectPair(secondEncapsulatingMap != null)
THEN
   do something.. 
END

I haven't tried to compile this.. but the general idea is there.



--
View this message in context: 
http://drools.46999.n3.nabble.com/irrational-behaviour-by-drools-engine-tp4028104p4028121.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] problem with drools

2014-02-28 Thread rjr201
You need to bind your fact to a variable, so that you can call the getFileOld
method from a non static context. Also, I think you'd be better to use !=
rather than the 'not' keyword ('not' should be read 'doesn't exist' which
doesn't work if you want to bind a value). So your rule should be something
like:

rule "files not equal"

  when
$file : FileData(fileOld != fileNew)
then
   System.out.println("files are not equal");
   difference($file.getFileOld(),$file.getFileNew()); 

end



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-problem-with-drools-tp4028402p4028404.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] problem with drools

2014-02-28 Thread rjr201
What objects are you inserting into the session?



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-problem-with-drools-tp4028402p4028416.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] problem with drools

2014-02-28 Thread rjr201
I think you must be inserting more than one object into your session. 

You should be doing something like: 

kSession.insert(fileData);
kSession.fireAllRules();



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-problem-with-drools-tp4028402p4028419.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 Guvnor : Rule validation fails - Not finding any of the fields from the Fact

2014-03-04 Thread rjr201
I don't know for certain but I think it is necessary to have getters and
setters on all attributes you want drools to be able to access.

What version of Guvnor are you using? 

In 5.3 you should be able to go to the "Edit" tab of the package and see
your classes under 'imported types'.

To see if your attributes are being picked up, you could create a rule using
the guided editor, add a condition (select one of your classes from the list
provided), and then if you click on the this new condition it should give
you a drop down box of the fields you can add as restrictions (If the list
is empty you know it's not picking up on your attributes).

Hope that's some sort of help. 

  



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Guvnor-Rule-validation-fails-Not-finding-any-of-the-fields-from-the-Fact-tp4028472p4028481.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 Guvnor : Rule validation fails - Not finding any of the fields from the Fact

2014-03-05 Thread rjr201
Hi,

I'm not sure what you mean by a custom operator? Could you give a code
example? Or explain the steps you have gone through using Guvnor?

Cheers,
Rich. 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-Guvnor-Rule-validation-fails-Not-finding-any-of-the-fields-from-the-Fact-tp4028472p4028525.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 allow non-programmers/non-Drools programmers to define rules

2014-03-21 Thread rjr201
DSL's are ok up to a point. However I've found it's sometimes easier to
create very simple java classes and teach users the basics of the drools
language. 

It's really down to the problem you are trying to solve.

Have you looked into using spreadsheets? If you can fit your
problem/solution into the spreadsheet format then I would strongly recommend
you use that approach. Business users understand spreadsheets, and it
reduces the risk of users making syntax/logic errors (spreadsheets
essentially provide a template in which the user fills in parameters). 



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-allow-non-programmers-non-Drools-programmers-to-define-rules-tp4028875p4028880.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] Getting started

2014-03-24 Thread rjr201
Hi,

I'm sure what you're trying to do in your example, but there is a simple
working example using drools 6 here:

https://github.com/droolsjbpm/drools/tree/master/drools-examples-api/default-kiesession

I took this as a starting point and adapted it to meet my requirements.  



--
View this message in context: 
http://drools.46999.n3.nabble.com/Getting-started-tp4028926p4028936.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 do word match in drools?

2014-03-27 Thread rjr201
Hi, 

This is more a question about regular expressions than drools. However, if I
understand your question correctly you want to change this:

.*sushi.*

to

 *sushi .*

Cheers,
Rich



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-How-to-do-word-match-in-drools-tp4028979p4028996.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] uploading jar into drools-repo : ERROR

2014-03-31 Thread rjr201
Hi,

Can you also outline how you created the jar file? 



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-uploading-jar-into-drools-repo-ERROR-tp4029006p4029030.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] Creating Categories Programmatically

2014-03-31 Thread rjr201
Hi,

I'm using Guvnor 5.3 and need to create a category programmatically. I can't
seem to find any documentation to do this. 

Does anyone know if it's possible? 

Any help would be greatly appreciated..

Cheers,
Rich.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Creating-Categories-Programmatically-tp4029034.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] Creating Categories Programmatically

2014-03-31 Thread rjr201
Thanks for that. I'll give it a go in 5.3.

Cheers,
Rich.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Creating-Categories-Programmatically-tp4029034p4029039.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] Drools 6 Fusion Example

2014-06-23 Thread rjr201
Hi,

Does anyone know of a simple (complete) working example of a Drools Fusion
project using Drools 6? 

My kModule.xml file so far looks like this: 


http://jboss.org/kie/6.0.0/kmodule";>










However, I think I need to define an entryPoint in the kmodule.xml.. but
can't find an example of how to do this. 

If anyone can point me to an example it would be greatly appreciated.

Cheers,
Rich



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-6-Fusion-Example-tp4030139.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


  1   2   >