Re: [rules-users] Drools 6.0.1: Pushing changes back to Workbench GIT using SSH

2014-04-10 Thread Maxime Falaize
I've tried to generate a public/private key pair and put the public one
into the .security folder but it still doesn't work. Can you explain what I
have to do exactly ?

Thanks


2014-04-07 19:27 GMT+02:00 Alexandre Porcelli porce...@redhat.com:

 Hi Rishi,

  The SSH server public key info for workbench is stored into .security
 folder (more info about it here:
 http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html#wb.systemProperties
 )

 Regards,
 ---
 Alexandre Porcelli
 Principal Software Engineer
 Red Hat Business Systems and Intelligence Group

 On Jan 21, 2014, at 11:32 PM, dotrc rishi.choudh...@gmail.com wrote:

  I am using workbench for managing my rules maven projects within the
 embedded
  GIT repository. I am aware that using git:// protocol, I can clone an
  existing rule repository; I can do this successfully.
 
  For authoring rules, I want to use Eclipse (using EGit). I want to push
 my
  commits back to the GIT repo. I understand that I'll have to use ssh
  protocol instead of git for specifying the repo, something like this:
  ssh://{userName}@localhost:8001/{repoName}
 
  When we use a standard GIT repo like stash, it gives us an option to set
 our
  public key on the stash server, but I'm not able to find a way to do that
  with the embedded ssh server within workbench. Hence, I'm not able to
  authenticate myself and perform a push.
 
  We tried creating a private-public key pair using ssh-keygen and put that
  within c:\users\username\.ssh and added the public key to
  'authorized_keys(2) (though I know this may not be the right place) and
 then
  used the private key as the identity file with ssh client directly from
  cygwin, again to no avail.
 
  Any pointers will be really appreciated.
 
  Also, should the username be 'admin' or any other specific one for
 pushing?
  Will the existing Windows username work?
 
  Thanks,
  Rishi
 
 
 
 
 
  --
  View this message in context:
 http://drools.46999.n3.nabble.com/Drools-6-0-1-Pushing-changes-back-to-Workbench-GIT-using-SSH-tp4027800.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




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

[rules-users] External Jar/Pojo in Drools Workbench.

2014-04-10 Thread Leonard93
Hello everyone, I have a small question/problem.

I have created a class (POJO) in Eclipse and I want to be able to write
rules over this class in the Drools Workbench, thus I exported the class and
the classes it depends on (1 other class) to a Jar and imported it in the
Drools workbench.

Now what I did next is I added the jar dependency to my workbench project,
created a new datamodel and set its super class to the external class from
the jar and left the rest empty.

When I then try to use this datamodel in a guided rule or anything I can
access the variables defined in the external class fine when using the rule
editor. But when I save I get various compiler errors.

Currently I tried to make a rule template and I got these errors (I am using
the standard example project to test it out):

Unable to create Field Extractor for *'Destination'Field/method
'destination'* not found for class '*org.mortgages.Test' *

Unable to Analyse Expression *Destination ==
GenericDataObject$Country.Germany*: [Error: unable to resolve method using
strict-mode: *org.mortgages.Test.GenericDataObject$Country()]* [Near : {...*
Destination == GenericDataObject$Country.Germ }]* ^ [Line: 9, Column: 2]


The class from the jar looks like this:
public class GenericDataObject {

public enum Country
{
Egypt,
Germany,
Turkey,
France,
Unknown
}

public GenericDataObject()
{
result = new Result();
}

public Result result;
public Country Destination;

public void setDiscount(int amount)
{
result.discount = amount;
}
}

public class Result
{
public int discount;

public Result()
{
discount = 0;
}
}



--
View this message in context: 
http://drools.46999.n3.nabble.com/External-Jar-Pojo-in-Drools-Workbench-tp4029190.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] External Jar/Pojo in Drools Workbench.

2014-04-10 Thread Michael Anstis
There should be no need to extend the classes in the JAR using the Data
Modeller (unless you really want to of course).

Did you import all the classes your rule needs - if they are in different
packages - with the Config tab?

Can you please provide your JAR and a screen-shot of the rule you're trying
to author?




On 10 April 2014 12:58, Leonard93 leonardlinde...@hotmail.com wrote:

 Hello everyone, I have a small question/problem.

 I have created a class (POJO) in Eclipse and I want to be able to write
 rules over this class in the Drools Workbench, thus I exported the class
 and
 the classes it depends on (1 other class) to a Jar and imported it in the
 Drools workbench.

 Now what I did next is I added the jar dependency to my workbench project,
 created a new datamodel and set its super class to the external class from
 the jar and left the rest empty.

 When I then try to use this datamodel in a guided rule or anything I can
 access the variables defined in the external class fine when using the rule
 editor. But when I save I get various compiler errors.

 Currently I tried to make a rule template and I got these errors (I am
 using
 the standard example project to test it out):

 Unable to create Field Extractor for *'Destination'Field/method
 'destination'* not found for class '*org.mortgages.Test' *

 Unable to Analyse Expression *Destination ==
 GenericDataObject$Country.Germany*: [Error: unable to resolve method using
 strict-mode: *org.mortgages.Test.GenericDataObject$Country()]* [Near :
 {...*
 Destination == GenericDataObject$Country.Germ }]* ^ [Line: 9, Column:
 2]


 The class from the jar looks like this:
 public class GenericDataObject {

 public enum Country
 {
 Egypt,
 Germany,
 Turkey,
 France,
 Unknown
 }

 public GenericDataObject()
 {
 result = new Result();
 }

 public Result result;
 public Country Destination;

 public void setDiscount(int amount)
 {
 result.discount = amount;
 }
 }

 public class Result
 {
 public int discount;

 public Result()
 {
 discount = 0;
 }
 }



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/External-Jar-Pojo-in-Drools-Workbench-tp4029190.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] External Jar/Pojo in Drools Workbench.

2014-04-10 Thread Leonard93
I did not realize you could import them in the config and then reference them
right away in the rule without doing the data modelling step. Although I did
that and it still has the same problems.

GenericDataObject.jar
http://drools.46999.n3.nabble.com/file/n4029192/GenericDataObject.jar  

is the jar I am using, The rule I am using for it now is:
http://drools.46999.n3.nabble.com/file/n4029192/IGlG0CB.png 

I added the two classes in the config imports aswell as the enum that is
used for the country value.




--
View this message in context: 
http://drools.46999.n3.nabble.com/External-Jar-Pojo-in-Drools-Workbench-tp4029190p4029192.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] External Jar/Pojo in Drools Workbench.

2014-04-10 Thread Michael Anstis
OK, I imported your JAR and created a rule as shown below.

The Guided Rule Editor had the option to select the enums for Country.

Theonly issue I had was with Destination itself - as it should be a lower
case d. Drools Compiler did report an error that  is was ...Unable to
create Field Extractor for 'Destination'Field/method 'destination' not
found for class 'com.sample.GenericDataObject'. I suspect if you change
the field name to destination it would work OK.

This was with the latest code @master in github.

1.|package org.anstis.p1;2.|3.|import java.lang.Number;4.|import
 com.sample.GenericDataObject;5.|import
 com.sample.GenericDataObject.Airline;6.|import
 com.sample.GenericDataObject.Country;7.|import com.sample.Result;8.|9.|rule
 r110.|dialect mvel11.|when12.|GenericDataObject(
Destination == Country.Egypt )13.|then14.|end


On 10 April 2014 12:58, Leonard93 leonardlinde...@hotmail.com wrote:

 Hello everyone, I have a small question/problem.

 I have created a class (POJO) in Eclipse and I want to be able to write
 rules over this class in the Drools Workbench, thus I exported the class
 and
 the classes it depends on (1 other class) to a Jar and imported it in the
 Drools workbench.

 Now what I did next is I added the jar dependency to my workbench project,
 created a new datamodel and set its super class to the external class from
 the jar and left the rest empty.

 When I then try to use this datamodel in a guided rule or anything I can
 access the variables defined in the external class fine when using the rule
 editor. But when I save I get various compiler errors.

 Currently I tried to make a rule template and I got these errors (I am
 using
 the standard example project to test it out):

 Unable to create Field Extractor for *'Destination'Field/method
 'destination'* not found for class '*org.mortgages.Test' *

 Unable to Analyse Expression *Destination ==
 GenericDataObject$Country.Germany*: [Error: unable to resolve method using
 strict-mode: *org.mortgages.Test.GenericDataObject$Country()]* [Near :
 {...*
 Destination == GenericDataObject$Country.Germ }]* ^ [Line: 9, Column:
 2]


 The class from the jar looks like this:
 public class GenericDataObject {

 public enum Country
 {
 Egypt,
 Germany,
 Turkey,
 France,
 Unknown
 }

 public GenericDataObject()
 {
 result = new Result();
 }

 public Result result;
 public Country Destination;

 public void setDiscount(int amount)
 {
 result.discount = amount;
 }
 }

 public class Result
 {
 public int discount;

 public Result()
 {
 discount = 0;
 }
 }



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/External-Jar-Pojo-in-Drools-Workbench-tp4029190.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] External Jar/Pojo in Drools Workbench.

2014-04-10 Thread Leonard93
Ah thank you, I will look into that and try :) It seems like that would be
indeed the problem.




--
View this message in context: 
http://drools.46999.n3.nabble.com/External-Jar-Pojo-in-Drools-Workbench-tp4029190p4029194.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 Unable to load pom.properties

2014-04-10 Thread djb
Hi guys,

Drools 5 was so nice.  I am struggling with 6.  (6.0.1-Final)

So I've made a Maven project, ctCharges-0.1-SNAPSHOT, to contain my rules,
and it's basically the same as the named-kiesession example, without any
java files in it.  Same kmodule.xml, just my own parentless maven group
instead of org.drools.

I add the dependency to my main project, but when I try this:

KieServices kServices = KieServices.Factory.get();
KieContainer kContainer = kServices.getKieClasspathContainer();
KieSession ksession = kContainer.newKieSession(ksession1);

it gets this:

Found kmodule:
vfs:/C:/jboss-eap/standalone/deployments/iconRules6.war/WEB-INF/lib/ctCharges-0.1-SNAPSHOT.jar/META-INF/kmodule.xml
Virtual file physical path =
C:\jboss-eap\standalone\tmp\vfs\deployment\deployment59bc0232401e9992\ctCharges-0.1-SNAPSHOT.jar-2808edf3c95bef92\ctCharges-0.1-SNAPSHOT.jar
*Unable to load pom.properties*
from\jboss-eap\standalone\tmp\vfs\deployment\deployment59bc0232401e9992\ctCharges-0.1-SNAPSHOT.jar-2808edf3c95bef92\ctCharges-0.1-SNAPSHOT.jar
null

(And then repeats this error couple of times)

If I look in the jar, I see:
META-INF/maven/com.mycompany/myArtifactName/pom.xml and pom.properties


What is going on?





--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-6-Unable-to-load-pom-properties-tp4029198.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 6 Unable to load pom.properties

2014-04-10 Thread djb
Hmm, so it does seem though, that while my Maven .m2 repo version of
ctCharges-0.1-SNAPSHOT.jar has the pom files, my main application,
application.war/WEB-INF/lib/ctCharges-0.1-SNAPSHOT.jar is missing them. 
Huh.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Drools-6-Unable-to-load-pom-properties-tp4029198p4029199.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 deploying war

2014-04-10 Thread Ven Tadipatri

  
  
Hi,
   I'm trying to get set up with Drools and Guvnor. I've had some
  success building a test program with Drools, but when I saw that
  there's a webapp
  to manage and view rules, I was interested in getting that working
  as well. Unfortunately I haven't had much success with that.
   I downloaded the kie-drools-wb-distribution-6.0.1.Final.zip file
  from the JBoss drools website and dropped the
  binaries/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war
  into my Tomcat directory. Tomcat was just hanging for a while,
  then spit out a bunch of error messages:
  Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext
  startInternal
  INFO: Deploying web application archive
/opt/tomcat/tomcat7/webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war
  Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext
  startInternal
  SEVERE: Error listenerStart
  Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext
  startInternal
  SEVERE: Context
  [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] startup
  failed due to previous errors
  Apr 10, 2014 2:21:40 PM
  org.apache.catalina.loader.WebappClassLoader
  clearReferencesThreads
  SEVERE: The web application
  [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears
  to have started a thread named [pool-4-thread-1] but has failed to
  stop it. This is very likely to create a memory leak.
  Apr 10, 2014 2:21:40 PM
  org.apache.catalina.loader.WebappClassLoader
  clearReferencesThreads
  SEVERE: The web application
  [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears
  to have started a thread named [Thread-3] but has failed to stop
  it. This is very likely to create a memory leak.
  Apr 10, 2014 2:21:40 PM
  org.apache.catalina.loader.WebappClassLoader
  clearReferencesThreads
  SEVERE: The web application
  [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears
  to have started a thread named [pool-7-thread-1] but has failed to
  stop it. This is very likely to create a memory leak.
  Apr 10, 2014 2:21:40 PM
  org.apache.catalina.loader.WebappClassLoader
  clearReferencesThreads
  SEVERE: The web application
  [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears
  to have started a thread named [Git-Daemon-Accept] but has failed
  to stop it. This is very likely to create a memory leak.
  Apr 10, 2014 2:21:40 PM
  org.apache.catalina.loader.WebappClassLoader
  checkThreadLocalMapForLeaks
  SEVERE: The web application
  [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] created a
  ThreadLocal with key of type
  [org.jboss.errai.config.util.ClassScanner$1] (value
  [org.jboss.errai.config.util.ClassScanner$1@1b3870a5]) and a value
  of type [java.lang.Boolean] (value [true]) but failed to remove it
  when the web application was stopped. Threads are going to be
  renewed over time to try and avoid a probable memory leak.
  Apr 10, 2014 2:21:40 PM
  org.apache.catalina.loader.WebappClassLoader
  checkThreadLocalMapForLeaks
  SEVERE: The web application
  [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] created a
  ThreadLocal with key of type
  [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1]
  (value
  [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1@166b6e99])
  and a value of type
  [org.apache.catalina.core.ApplicationContextFacade] (value
  [org.apache.catalina.core.ApplicationContextFacade@672a0a4e]) but
  failed to remove it when the web application was stopped. Threads
  are going to be renewed over time to try and avoid a probable
  memory leak.
  Apr 10, 2014 2:21:40 PM
  org.apache.catalina.loader.WebappClassLoader
  checkThreadLocalMapForLeaks
  SEVERE: The web application
  [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] created a
  ThreadLocal with key of type [org.eclipse.jgit.nls.NLS$1] (value
  [org.eclipse.jgit.nls.NLS$1@790abbcb]) and a value of type
  [org.eclipse.jgit.nls.NLS] (value
  [org.eclipse.jgit.nls.NLS@2faf4a82]) but failed to remove it when
  the web application was stopped. Threads are going to be renewed
  over time to try and avoid a probable memory leak.
  
  Next I tried building the workbench from source:
https://github.com/droolsjbpm/drools-wb/archive/6.0.1.Final.zip
The maven build worked, and I dropped the tomcat war into the
tomcat directory (removing any existing webapps and wars). Starting
Tomcat now produced these errors:

  
INFO: Deploying web application archive
/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war
2014-04-10 

[rules-users] Guvnor - Importing Drl FIle and its associated model

2014-04-10 Thread mattmadhavan
Hello,
In have a working Drools project. I would like to import existing DRL files
and associated Model file.

I have a custom operator as well. I have packaged the Model and necessary
operators and util global functions into a jar with their dependencies.

How do I import my DRL and the model jar so that, the DRL's imports 'see'
the referenced operators and functions and the Model (FACT) classes.

Can some one please let me have the sequence of steps?

Thanks
Matt



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-Importing-Drl-FIle-and-its-associated-model-tp4029203.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] How to install Drool web WB - Tomcat?

2014-04-10 Thread bbarani
I download the drools workbench war
(kie-drools-wb-distribution-6.0.1.Final.zip) and tried deploying it on
Tomcat. The application gets deployed but not getting started (when seen
from server console).

Do I need to do anything else apart from placing the WAR file in the webapps
directory? please advise



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-install-Drool-web-WB-Tomcat-tp4029204.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