Re: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3)

2014-05-21 Thread Ephemeris Lappis
Hello.

Although without much conviction, I've tried the
Bundle-RequiredExecutionEnvironment: J2SE-1.7, but it doesn't change the
compilation level of the rules...

As I said in a previous answer, I don't know exactly how to do it, but I
think the solution may be in the way that Drools takes the classloader
passed by the application to have access to specific classes like the
usually imported beans used in the rules. Indeed, perhaps that instead of
using directly this classloader, for its tasks, among of them the rules
compilation, it should be possible to use some kind of enriched classloader
that carries all the Drools needed packages, and delegates application
classes resolution to the application's one.

What do you think of that ?

Regards.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029635.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 compilation error with OSGi integration (6.1.0.Beta3)

2014-05-21 Thread Charles Moulliard
If you look to my example posted previously there are no issues. Can you
make a test using just Apache Karaf 2.3.x with Drools 6.1.0.Beta3 and tell
me what happen. Which JDK do you sue ?


On Wed, May 21, 2014 at 9:03 AM, Ephemeris Lappis 
ephemeris.lap...@gmail.com wrote:

 Hello.

 Although without much conviction, I've tried the
 Bundle-RequiredExecutionEnvironment: J2SE-1.7, but it doesn't change the
 compilation level of the rules...

 As I said in a previous answer, I don't know exactly how to do it, but I
 think the solution may be in the way that Drools takes the classloader
 passed by the application to have access to specific classes like the
 usually imported beans used in the rules. Indeed, perhaps that instead of
 using directly this classloader, for its tasks, among of them the rules
 compilation, it should be possible to use some kind of enriched classloader
 that carries all the Drools needed packages, and delegates application
 classes resolution to the application's one.

 What do you think of that ?

 Regards.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029635.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




-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3)

2014-05-21 Thread Ephemeris Lappis
Hello.

I could try to test on ServiceMix 5 that embeds Karaf  2.3.4, but for my
concrete project, the customer current platform uses a ServiceMix 4.5.3
which is not really possible to change today while many other modules are
already deployed.

Did you try in your environment the test project that I attached yesterday
? There is a rule in the project with an accumulate that generates java
code that is not compiled because of missing indirect dependancy despite of
the Import-Package that I've copied from your examples. Hence my idea of a
proxy classloader between Drools and its compiler and the classloader
provided by the application bundle, and avoid the dynamic import that
breaks the good practices...


2014-05-21 11:48 GMT+02:00 Charles Moulliard ch0...@gmail.com:

 If you look to my example posted previously there are no issues. Can you
 make a test using just Apache Karaf 2.3.x with Drools 6.1.0.Beta3 and tell
 me what happen. Which JDK do you sue ?


 On Wed, May 21, 2014 at 9:03 AM, Ephemeris Lappis 
 ephemeris.lap...@gmail.com wrote:

 Hello.

 Although without much conviction, I've tried the
 Bundle-RequiredExecutionEnvironment: J2SE-1.7, but it doesn't change the
 compilation level of the rules...

 As I said in a previous answer, I don't know exactly how to do it, but I
 think the solution may be in the way that Drools takes the classloader
 passed by the application to have access to specific classes like the
 usually imported beans used in the rules. Indeed, perhaps that instead of
 using directly this classloader, for its tasks, among of them the rules
 compilation, it should be possible to use some kind of enriched
 classloader
 that carries all the Drools needed packages, and delegates application
 classes resolution to the application's one.

 What do you think of that ?

 Regards.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029635.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




 --
 Charles Moulliard
 Apache Committer / Architect @RedHat
 Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io


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

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

[rules-users] Using KieScanner in drools6

2014-05-21 Thread ganeshneelekani
Hi Team,

I go through with the release doc 
http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html_single/
and found that 


2.1.6. KieScanner

The KieScanner is a maven-oriented replacement of the KnowledgeAgent present
in Drools 5. 

using knowledgwAgent I have linked through changeset.xml by below code in
drools 5.4

KnowledgeAgent kagent =
KnowledgeAgentFactory.newKnowledgeAgent(MyAgent1,kbase, kconf);   
ResourceFactory.getResourceChangeNotifierService().start();
ResourceFactory.getResourceChangeScannerService().start();
kagent.applyChangeSet(ResourceFactory.newUrlResource(http://localhost:8380/drools-guvnor/ChangeSet.xml;));
kbase = kagent.getKnowledgeBase();

How I can achieve this using drools 6 to interact with  my java code to
drools workbench.

or which drools 6 need to download to interact with java code.

Please suggest me, 


Thanks
Ganesh Neelekani




--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-KieScanner-in-drools6-tp4029638.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 compilation error with OSGi integration (6.1.0.Beta3)

2014-05-21 Thread Charles Moulliard
I can reproduce your error when I deploy the project (compiled with 1.7)
and running with JDK 1.7 on Karaf 2.2.1/Felix 3.2.2 (= SMX 4.5.3)

2014-05-21 13:30:25,020 | INFO  | l Console Thread | ClasspathKieProject
   | 211 - org.drools.compiler - 6.0.3.redhat-1 | Found kmodule:
bundle://214.4:1/META-INF/kmodule.xml
2014-05-21 13:30:25,024 | DEBUG | l Console Thread | ClasspathKieProject
   | 211 - org.drools.compiler - 6.0.3.redhat-1 | Discovered
classpath module org.drools.example:simple:1.0.0-SNAPSHOT
2014-05-21 13:30:25,024 | INFO  | l Console Thread | KieRepositoryImpl
   | 211 - org.drools.compiler - 6.0.3.redhat-1 | KieModule was
added:org.drools.osgi.compiler.OsgiKieModule@501d0b5a
2014-05-21 13:30:25,044 | ERROR | l Console Thread | AbstractKieModule
   | 211 - org.drools.compiler - 6.0.3.redhat-1 | Unable to build
KieBaseModel:sampleKBase
Rule Compilation error : [Rule name='CanDrink']
org/drools/example/drink/Rule_CanDrink1955060708.java (8:541) : ArrayList
cannot be resolved to a type
org/drools/example/drink/Rule_CanDrink1955060708.java (8:550) : Syntax
error on token , ? expected after this token

BTW you have a workaround which is to define your code like this

ListString l = new ArrayListString();

Is it because the server runs with JDK 5 in production that you cannot
change the code of the rules ?
As ServiceMix is just a packaging of Karaf + Camel + Cxf + ActiveMQ, why
don't you use directly Karaf and a more recent version of Felix (4.x) ?





On Wed, May 21, 2014 at 12:55 PM, Ephemeris Lappis 
ephemeris.lap...@gmail.com wrote:

 Hello.

 I could try to test on ServiceMix 5 that embeds Karaf  2.3.4, but for my
 concrete project, the customer current platform uses a ServiceMix 4.5.3
 which is not really possible to change today while many other modules are
 already deployed.

 Did you try in your environment the test project that I attached yesterday
 ? There is a rule in the project with an accumulate that generates java
 code that is not compiled because of missing indirect dependancy despite of
 the Import-Package that I've copied from your examples. Hence my idea of a
 proxy classloader between Drools and its compiler and the classloader
 provided by the application bundle, and avoid the dynamic import that
 breaks the good practices...


 2014-05-21 11:48 GMT+02:00 Charles Moulliard ch0...@gmail.com:

 If you look to my example posted previously there are no issues. Can you
 make a test using just Apache Karaf 2.3.x with Drools 6.1.0.Beta3 and tell
 me what happen. Which JDK do you sue ?


 On Wed, May 21, 2014 at 9:03 AM, Ephemeris Lappis 
 ephemeris.lap...@gmail.com wrote:

 Hello.

 Although without much conviction, I've tried the
 Bundle-RequiredExecutionEnvironment: J2SE-1.7, but it doesn't change
 the
 compilation level of the rules...

 As I said in a previous answer, I don't know exactly how to do it, but I
 think the solution may be in the way that Drools takes the classloader
 passed by the application to have access to specific classes like the
 usually imported beans used in the rules. Indeed, perhaps that instead of
 using directly this classloader, for its tasks, among of them the rules
 compilation, it should be possible to use some kind of enriched
 classloader
 that carries all the Drools needed packages, and delegates application
 classes resolution to the application's one.

 What do you think of that ?

 Regards.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029635.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




 --
 Charles Moulliard
 Apache Committer / Architect @RedHat
 Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io


 ___
 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




-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Using KieScanner in drools6

2014-05-21 Thread Mark Proctor
See 
http://docs.jboss.org/drools/release/6.1.0.Beta3/drools-docs/html/KIEChapter.html
4.2.3.5. Settings.xml and Remote Repository Setup

4.2.3.3. KieScanner

4.2.5. Installation and Deployment Cheat Sheets


Mark

On 21 May 2014, at 11:59, ganeshneelekani ganeshneelek...@gmail.com wrote:

 Hi Team,
 
 I go through with the release doc 
 http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html_single/
 and found that 
 
 
 2.1.6. KieScanner
 
 The KieScanner is a maven-oriented replacement of the KnowledgeAgent present
 in Drools 5. 
 
 using knowledgwAgent I have linked through changeset.xml by below code in
 drools 5.4
 
 KnowledgeAgent kagent =
 KnowledgeAgentFactory.newKnowledgeAgent(MyAgent1,kbase, kconf); 
 ResourceFactory.getResourceChangeNotifierService().start();
 ResourceFactory.getResourceChangeScannerService().start();
 kagent.applyChangeSet(ResourceFactory.newUrlResource(http://localhost:8380/drools-guvnor/ChangeSet.xml;));
   kbase = kagent.getKnowledgeBase();
 
 How I can achieve this using drools 6 to interact with  my java code to
 drools workbench.
 
 or which drools 6 need to download to interact with java code.
 
 Please suggest me, 
 
 
 Thanks
 Ganesh Neelekani
 
 
 
 
 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Using-KieScanner-in-drools6-tp4029638.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] Using KieScanner in drools6

2014-05-21 Thread ganeshneelekani
Hi Mark,

Thanks for suggestions.I will go through with above link
I go through with document it uses maven, I do not have any knowledge on
maven, Do I need to learn maven to develop project in drools 6 ?
I developed using changeset.xml to link java and drools, And
drools-guvnor.war, and designer.war in drools 5.4 version.

If I develop maven project  how to link maven and workbench - I felt
confusing in this,

Does following code helps





KieServices kieServices = KieServices.Factory.get();

ReleaseId releaseId = kieServices.newReleaseId( *org.acme, myartifact,
1.0-SNAPSHOT* );

KieContainer kContainer = kieServices.newKieContainer( releaseId );

KieScanner kScanner = kieServices.newKieScanner( kContainer );


// Start the KieScanner polling the Maven repository every 10 seconds

kScanner.start( 1L )



2. I practiced  some workbench tutorial.. and its almost different from
drools 5.4,

Is there any possible of integrating drools workbench and java code, or else
I need to use any other drools war to develop application

thanks for your patience .


Regards
Ganesh N



--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-KieScanner-in-drools6-tp4029638p4029641.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 @PropertySpecific supported in Drools 5.6.0

2014-05-21 Thread Davide Sottara
In the end it was actually named @PropertyReactive

On 05/21/2014 12:38 AM, RavishankarHassain wrote:
 I was looking fro some examples and document which explains on how to use the
 @Modifies annotations inside Facts(Java class) and it happened for me to see
 this doc 

 http://docs.jboss.org/drools/release/5.4.0.Beta2/droolsjbpm-introduction-docs/html/releaseNotesBeta2.html

 I tired to implement @PropertySpecific and @Modifies according to the
 session 3.1.2.1. Fine Grained Property Change Listeners (Property Specific)
 which is briefly described in the above mentioned link

 But, when I tried to use @PropertySpecific annotation in my Facts(java
 class) Eclipse IDE is not able to identify or resolve the package for
 @PropertySpecific annotation. I am using Drools 5.6.0. Is this
 @PropertySpecific annotation still supported in Drools, if yes then where is
 it ? in which package and in which jar ? 



 --
 View this message in context: 
 http://drools.46999.n3.nabble.com/Is-PropertySpecific-supported-in-Drools-5-6-0-tp4029633.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] Is @PropertySpecific supported in Drools 5.6.0

2014-05-21 Thread RavishankarHassain
Thanks for the info 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Is-PropertySpecific-supported-in-Drools-5-6-0-tp4029633p4029643.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] XML and the Guided Decision Tables

2014-05-21 Thread Kysis
Hello my team and I are trying to write a script in order to convert and
condense a decision table to import it into the workbench as a Guided
Decision Table. Is there documentation for the XML file that represents a
GDT? 

Thanks, Michael.



--
View this message in context: 
http://drools.46999.n3.nabble.com/XML-and-the-Guided-Decision-Tables-tp4029644.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] XML and the Guided Decision Tables

2014-05-21 Thread Michael Anstis
There is no schema for a GDST; it's simply an XStream dump of the POJO
model behind the editor.

We support conversion of XLS decision tables to GDST as from 5.4 (I think;
it's definitely in 5.5 and 6.0).

If either (a) you're not using XLS decision tables or (b) you want them
converted outside of the workbench you could always have a look at the code
that handles conversion and write something yourself
(droolsjbpm/drools-wb/drools-wb-screens/guided-dtable or a path to that
effect).

Cheers,

Mike

Sent on the move
On 21 May 2014 15:41, Kysis higherarc...@gmail.com wrote:

 Hello my team and I are trying to write a script in order to convert and
 condense a decision table to import it into the workbench as a Guided
 Decision Table. Is there documentation for the XML file that represents a
 GDT?

 Thanks, Michael.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/XML-and-the-Guided-Decision-Tables-tp4029644.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