[rules-users] Using global variable in DRL file

2012-07-26 Thread zeeshan
Hi All !

I am trying use global variable in DRL file but when I am using it, gives
Exception. Please have a look at the DRL file -




package com.drools.rules
import com.drools.facts.*; 
*global CSVBeanAgent csvAgent;*  [here I have declared the Global variable]



rule Calculating Agent APE

salience 35
no-loop true
when

$csvPolicy : CSVBeanPolicy()
//$csvAgent : CSVBeanAgent()
then
  
  
   System.out.println(For agent ---z in rule setting premium form
rate+$csvPolicy.getPremiumMode());
double policyAPE=$csvPolicy.getPolicyAPE();
System.out.println(policyAPE+policyAPE);
*System.out.println(Agent
+csvAgent);*
double agentAPE=0.0;
  if(csvAgent.getAgentNo()==$csvPolicy.getAgentNo()){
  System.out.println(inside if);
 agentAPE=agentAPE+policyAPE;
  }
  csvAgent.setAgentAPE(agentAPE);
   System.out.println(AgentAPE+csvAgent.getAgentAPE());
   update($csvPolicy);
 
end


Above is my rulethe Bold one is I am trying to the value of *csvAgent*,
it gives *null* value. Please help me in finding the solution i.e. How to
declare the global variable and how to use it in DRL file.

Thanks !


 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-global-variable-in-DRL-file-tp4018911.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 global variable in DRL file

2012-07-26 Thread Michael Anstis
Try reading the Drools Expert User Guide section about the use of Globals :)

Globals are not Facts to be reason in the Left-Hand-Side (WHEN) part of a
rule.

Either use the Global (assuming it contains static data) and initialize it
correctly from within Java code (see the User Guide) or insert it as a Fact
and reason with it.

With kind regards,

Mike

On 26 July 2012 09:38, zeeshan zeeshan.spr...@gmail.com wrote:

 Hi All !

 I am trying use global variable in DRL file but when I am using it, gives
 Exception. Please have a look at the DRL file -




 package com.drools.rules
 import com.drools.facts.*;
 *global CSVBeanAgent csvAgent;*  [here I have declared the Global variable]



 rule Calculating Agent APE

 salience 35
 no-loop true
 when

 $csvPolicy : CSVBeanPolicy()
 //$csvAgent : CSVBeanAgent()
 then


System.out.println(For agent ---z in rule setting premium form
 rate+$csvPolicy.getPremiumMode());
 double policyAPE=$csvPolicy.getPolicyAPE();
 System.out.println(policyAPE+policyAPE);
 *System.out.println(Agent
 +csvAgent);*
 double agentAPE=0.0;
   if(csvAgent.getAgentNo()==$csvPolicy.getAgentNo()){
   System.out.println(inside if);
  agentAPE=agentAPE+policyAPE;
   }
   csvAgent.setAgentAPE(agentAPE);

  System.out.println(AgentAPE+csvAgent.getAgentAPE());
update($csvPolicy);

 end


 Above is my rulethe Bold one is I am trying to the value of *csvAgent*,
 it gives *null* value. Please help me in finding the solution i.e. How to
 declare the global variable and how to use it in DRL file.

 Thanks !






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

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


Re: [rules-users] How to make available declarative model to all packages.

2012-07-26 Thread Michael Anstis
I have tried with 5.4.0.Final and found everything to work as required.

These are the steps I followed (which don't appear out of the ordinary):-

1) Create new Declarative Model (let's call in GADM) in Global Area
2) Define GADM.
3) Save GADM.
4) Create new Package (called P1)
5) Create new Package (called P2)
6) Create new Declarative Model in P1 (import GADM from Global Area)
7) Create new Declarative Model in P2 (import GADM from Global Area)
8) Create new Rule (called P1R1) in P1
9) GADM is visible to P1R1
10) Create new Rule (called P2R1) in P2
11) GADM is visible to P2R1.

With kind regards,

Mike

On 25 July 2012 08:03, rodolphio m.rindflei...@gameartstudio.de wrote:

 I'm using Guvnor 5.4




 --
 View this message in context:
 http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018892.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 global variable in DRL file

2012-07-26 Thread zeeshan
Hi Mike !

Earlier I tried it inserting as a Fact in using Statefull Session in my
RuleMain.java but was facing Java Heap Space error...so I tried
Declaring as a Global in RuleMain.java like this


HashMapString, Object globals = new HashMapString, Object();

StatefulSession statefulSession=new
RuleRunner().getStatefulSession(RULES_FILES8,null,null, globals, null);
...



//local block for Agent
{
System.out.println(agent block);
String 
csvPath=C:/Users/new_user/Desktop/CIMS/ABAgent.csv;
  try{
File f = new File(csvPath); 
InputStream is = new FileInputStream( f ); 
Reader rdr = new InputStreamReader( is ); 
LineNumberReader lnrdr = new LineNumberReader( rdr ); 

String line; 
while( (line = lnrdr.readLine()) != null ){ 
if( line.charAt(0) == '' ) continue; 
String[] tokens = line.split( ; ); 
if( tokens.length != 3 ) continue; 

int agentId = Integer.parseInt( tokens[0] ); 
int agentNo  = Integer.parseInt( tokens[1] ); 
String agentStatus = tokens[2]; 
   /* System.out.println(1+agentId);
System.out.println(2+agentNo);
System.out.println(3+agentStatus);*/

CSVBeanAgent csvAg = new CSVBeanAgent(); 
csvAg.setAgentId(agentId);
csvAg.setAgentNo(agentNo);
csvAg.setAgentStatus(agentStatus);
   
 //statefulSession.insert(csvAg);

*globals.put(csvAg.getAgentId()+, csvAg);*

} 
   
  }catch (Exception e) {
System.out.println(e);
} 
}




System.out.println(fire all rule);


statefulSession.fireAllRules();
//statefulSession2.fireAllRules();



log.debug( End Firing Rules =);

// Close the session
 statefulSession.dispose();
}
}



--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-global-variable-in-DRL-file-tp4018911p4018915.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 global variable in DRL file

2012-07-26 Thread Michael Anstis
So, you have multiple CSVBeanAgent's (created from a text file somewhere).
These are stored in a Map created in Java called globals.

Where do you actually set the global in WorkingMemory: See
http://docs.jboss.org/drools/release/5.4.0.Final/drools-expert-docs/html/ch04.html#d0e4482
.

Furthermore, the Global will be of type Map not CSVBeanAgent, unless you
want a Global for each CSVBeanAgent - but then how do you decide which you
need.

Personally, I'd go back to inserting CSVBeanAgents as Facts and tackle the
Java Heap Space issue... there are definitely things you are not telling us.

With kind regards,

Mike

On 26 July 2012 10:37, zeeshan zeeshan.spr...@gmail.com wrote:

 Hi Mike !

 Earlier I tried it inserting as a Fact in using Statefull Session in my
 RuleMain.java but was facing Java Heap Space error...so I tried
 Declaring as a Global in RuleMain.java like this


 HashMapString, Object globals = new HashMapString, Object();

 StatefulSession statefulSession=new
 RuleRunner().getStatefulSession(RULES_FILES8,null,null, globals, null);
 ...
 


 //local block for Agent
 {
 System.out.println(agent block);
 String
 csvPath=C:/Users/new_user/Desktop/CIMS/ABAgent.csv;
   try{
 File f = new File(csvPath);
 InputStream is = new FileInputStream( f );
 Reader rdr = new InputStreamReader( is );
 LineNumberReader lnrdr = new LineNumberReader( rdr
 );

 String line;
 while( (line = lnrdr.readLine()) != null ){
 if( line.charAt(0) == '' ) continue;
 String[] tokens = line.split( ; );
 if( tokens.length != 3 ) continue;

 int agentId = Integer.parseInt( tokens[0] );
 int agentNo  = Integer.parseInt( tokens[1] );
 String agentStatus = tokens[2];
/* System.out.println(1+agentId);
 System.out.println(2+agentNo);
 System.out.println(3+agentStatus);*/

 CSVBeanAgent csvAg = new CSVBeanAgent();
 csvAg.setAgentId(agentId);
 csvAg.setAgentNo(agentNo);
 csvAg.setAgentStatus(agentStatus);

  //statefulSession.insert(csvAg);

 *globals.put(csvAg.getAgentId()+, csvAg);*

 }

   }catch (Exception e) {
 System.out.println(e);
 }
 }




 System.out.println(fire all rule);


 statefulSession.fireAllRules();
 //statefulSession2.fireAllRules();



 log.debug( End Firing Rules =);

 // Close the session
  statefulSession.dispose();
 }
 }



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Using-global-variable-in-DRL-file-tp4018911p4018915.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 global variable in DRL file

2012-07-26 Thread zeeshan
Hi MIke !

Yes we have multiple CSVBeanAgent objects that initially we tried to insert
in statefull session but we faced heap size issue. This Heap Issue was
resolved by *Laune* using CSV, and we are following similar approach here
too but we faced heap size issue. So we followed global variable approach.

   Instead of inserting CSVBEanAGent objects in statefull session, we
inserted it in t he global variable of type Hashmap. By this we avoided Heap
size issue, but now the problem is Global variable in all the Rules as well
as retreive that updated global value back in RuleMain.java file.

So can u help us in finding other solution or  through global variable??


Thanks.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-global-variable-in-DRL-file-tp4018911p4018917.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 5.4.0.Final and JBoss AS 7.1.1.Final

2012-07-26 Thread Michael Anstis
Hi,

There have been a few messages recently suggesting there are problems
running Guvnor 5.4.0.Final on JBoss AS 7.1.1.Final.

I had a check and this is what I found:-

1) Downloaded guvnor-5.4.0-Final.zip from Drools website
2) Unzip
3) Deploy guvnor-5.4.0.Final-jboss-as-7.0.war to JBoss AS 7.1.1.Final
Brontes
4) Browsed to http://localhost:8080/guvnor-5.4.0.Final-jboss-as-7.0
5) Success.

The only WELD error I encountered was when trying to simultaneously deploy
5.4.0-Final and 5.5.0-SNAPSHOT side-by-side (any two enabled and running
instances would cause the same problem).

Whichever was deployed (and enabled second) barfed with:-

11:11:21,066 ERROR [org.drools.guvnor.server.RepositoryServiceServlet]
(http--127.0.0.1-8080-5) Service method 'public abstract
org.drools.guvnor.client.rpc.Module[]
org.drools.guvnor.client.rpc.ModuleService.listModules()' threw an
unexpected exception: org.jboss.weld.exceptions.WeldException: WELD-49
Unable to invoke [method] @PostConstruct public
org.drools.guvnor.server.repository.RulesRepositoryManager.createRulesRepository()
on org.drools.guvnor.server.repository.RulesRepositoryManager@d2b7d8:
org.jboss.weld.exceptions.WeldException: WELD-49 Unable to invoke
[method] @PostConstruct public
org.drools.guvnor.server.repository.RulesRepositoryManager.createRulesRepository()
on org.drools.guvnor.server.repository.RulesRepositoryManager@d2b7d8
at
org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:518)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:174)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:291)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:616)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.bean.AbstractReceiverBean.getReceiver(AbstractReceiverBean.java:73)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.bean.ProducerMethod$1.produce(ProducerMethod.java:131)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:299)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:61)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:616)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:681)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:118)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:703)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:712)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:161)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:157)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:131)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:153)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:290)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
at
org.drools.guvnor.server.RepositoryModuleService$Proxy$_$$_WeldClientProxy.listModules(RepositoryModuleService$Proxy$_$$_WeldClientProxy.java)
[guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final]
at
org.drools.guvnor.server.RepositoryServiceServlet.listModules(RepositoryServiceServlet.java:171)
[guvnor-webapp-core-5.4.0.Final.jar:5.4.0.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.6.0_23]
at

[rules-users] Guvnor Integration with Eclipse Issue !!

2012-07-26 Thread abhinay_agarwal
hey der !

m currently using GUVNOR v5.3.0

i made some DRLs in my Eclipse loaded them to Guvnor repository and after
loads of changes..i was finally able to build my kbase using the repositoy..

my change set is as foolows :

*?xml version=1.0 encoding=UTF-8?
change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'

add
resource source='
http://localhost:8089/drools-guvnor/org.drools.guvnor.Guvnor/package/Individual/LATEST.drl'
type='DRL' /
/add
/change-set*


My package name was Individual and it mainly contained technical rule
assests and one function, as shown in the image below :
http://drools.46999.n3.nabble.com/file/n4018919/drools1.png 

now i had a few changes in my POJO model so i updated the model and few
rules directly in the technical rule assest of guvnor, after which i built
the package created a new snapshot and tried running it, but got some error,
as :

1. Unable to Analyse Expression @Modify with($a){setExempt(Exempt
Account),setQueueName(Auto Classified Accounts)};

2. KnowledgeAgent exception while trying to deserialize
KnowledgeDefinitionsPackage  

After going through all the available post, nothing proved to be of any help
!!


Then i thought might be changing the technical assest directly from guvnor
is a bad idea...

So, i created a new package named Individual_New, uploaded the new POJO
model and uploaded just one rule from ECLIPSE(just to check if my kbase
builds or not)..

I uploaded just 1 rule in it, build the package and created a snapshot with
name LATEST, changed the change set as below:

*?xml version=1.0 encoding=UTF-8?
change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd'

add
resource source='
http://localhost:8089/drools-guvnor/org.drools.guvnor.Guvnor/package/Individual_New/LATEST.drl'
type='DRL' /
/add
/change-set*

n now when i tried running it, it threw me the following error :

java.lang.RuntimeException: java.io.IOException: Server returned HTTP
response code: 500 for URL:
http://localhost:8089/drools-guvnor/org.drools.guvnor.Guvnor/package/Individual_New/LATEST.drl
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:592)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:701)
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:679)
at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:979)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:774)
at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:646)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:192)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:174)
at
com.infy.fcs.drools.DroolsAdapter.readKnowledgeBase(DroolsAdapter.java:241)
at com.infy.fcs.drools.DroolsAdapter.main(DroolsAdapter.java:256)
Caused by: java.io.IOException: Server returned HTTP response code: 500 for
URL:
http://localhost:8089/drools-guvnor/org.drools.guvnor.Guvnor/package/Individual_New/LATEST.drl
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at org.drools.io.impl.UrlResource.grabStream(UrlResource.java:210)
at org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:146)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:311)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:495)
... 10 more
DEBUG [main] (DroolsAdapter.java:246) - java.io.IOException: Server returned
HTTP response code: 500 for URL:
http://localhost:8089/drools-guvnor/org.drools.guvnor.Guvnor/package/Individual_New/LATEST.drl
java.lang.RuntimeException: java.io.IOException: Server returned HTTP
response code: 500 for URL:
http://localhost:8089/drools-guvnor/org.drools.guvnor.Guvnor/package/Individual_New/LATEST.drl
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:592)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:701)
at

Re: [rules-users] Guvnor Integration with Eclipse Issue !!

2012-07-26 Thread abhinay_agarwal
i would also like to know if there can be any jar issue's ..

i m using drools plugin 5.4 Final in eclipse and Guvnor v is 5.3.0 Final

please lemme know (in details), the reason behind KnowledgeAgent exception
while trying to deserialize KnowledgeDefinitionsPackage error !!!

I read one of mike's post on it...

http://drools.46999.n3.nabble.com/KnowledgeAgent-exception-while-trying-to-deserialize-KnowledgeDefinitionsPackage-td2192555.html

which said that the cersion should be same...but i did not get any download
link for guvnor 5.3.0Final plugin for ECLIPSE !!!

Thanks,
Abhinay



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-Integration-with-Eclipse-Issue-tp4018919p4018920.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 make available declarative model to all packages.

2012-07-26 Thread rodolphio
I tried your steps you mentioned above with the existing repository: same
problem.
I setup a new repository in guvnor and tried your steps you mentioned above:
no problems.

It seems that the old repository has been chrashed for some reasons I can't
fix out.

So far it seems to work correctly now.

Thanks.



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-make-available-declarative-model-to-all-packages-tp3605644p4018921.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 Integration with Eclipse Issue !!

2012-07-26 Thread Michael Anstis
Different versions of the Eclipse Plugin and Guvnor is definitely a problem
you will want to eliminate.

I had no problem finding a download the the Eclipse Plugin:
http://download.jboss.org/drools/release/5.4.0.Final/droolsjbpm-tools-distribution-5.4.0.Final.zip.
There was a change made in 5.4 that affected the way binary packages are
serialized (the need for the change arose from Drools Expert to support
declarative models in different packages - which sounds related to what you
are experiencing).

With kind regards,

Mike

On 26 July 2012 13:09, abhinay_agarwal abhinay_agar...@infosys.com wrote:

 i would also like to know if there can be any jar issue's ..

 i m using drools plugin 5.4 Final in eclipse and Guvnor v is 5.3.0 Final

 please lemme know (in details), the reason behind KnowledgeAgent exception
 while trying to deserialize KnowledgeDefinitionsPackage error !!!

 I read one of mike's post on it...


 http://drools.46999.n3.nabble.com/KnowledgeAgent-exception-while-trying-to-deserialize-KnowledgeDefinitionsPackage-td2192555.html

 which said that the cersion should be same...but i did not get any download
 link for guvnor 5.3.0Final plugin for ECLIPSE !!!

 Thanks,
 Abhinay



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Guvnor-Integration-with-Eclipse-Issue-tp4018919p4018920.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 global variable in DRL file

2012-07-26 Thread Wolfgang Laun
This was the 50,000 lines spreadsheet?

IIRC, the data in the Bean wasn't engineered with memory saving in mind.
Could you please post this class again, and we'll see how to tone it
down to get then all into the heap.

-W

On 26/07/2012, zeeshan zeeshan.spr...@gmail.com wrote:
 Hi MIke !

 Yes we have multiple CSVBeanAgent objects that initially we tried to insert
 in statefull session but we faced heap size issue. This Heap Issue was
 resolved by *Laune* using CSV, and we are following similar approach here
 too but we faced heap size issue. So we followed global variable approach.

Instead of inserting CSVBEanAGent objects in statefull session, we
 inserted it in t he global variable of type Hashmap. By this we avoided
 Heap
 size issue, but now the problem is Global variable in all the Rules as well
 as retreive that updated global value back in RuleMain.java file.

 So can u help us in finding other solution or  through global
 variable??


 Thanks.



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Using-global-variable-in-DRL-file-tp4018911p4018917.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] Guvnor Integration with Eclipse Issue !!

2012-07-26 Thread abhinay_agarwal
hey mike,

thankz for the reply..

but i m using the plugin which yu supplied..i need a plugin for GUVNOR
v5.3.0

Thanks,
Abhinay





--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-Integration-with-Eclipse-Issue-tp4018919p4018925.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 Integration with Eclipse Issue !!

2012-07-26 Thread Michael Anstis
You need Guvnor 5.4 and the Eclipse Plugin 5.4.

Both are available here: http://www.jboss.org/drools/downloads

On 26 July 2012 14:26, abhinay_agarwal abhinay_agar...@infosys.com wrote:

 hey mike,

 thankz for the reply..

 but i m using the plugin which yu supplied..i need a plugin for GUVNOR
 v5.3.0

 Thanks,
 Abhinay





 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Guvnor-Integration-with-Eclipse-Issue-tp4018919p4018925.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] Guvnor Integration with Eclipse Issue !!

2012-07-26 Thread abhinay_agarwal
i cannot upgrade to guvnor 5.4...

need pluging for guvnor 5.3 final



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-Integration-with-Eclipse-Issue-tp4018919p4018928.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 Integration with Eclipse Issue !!

2012-07-26 Thread Michael Anstis
I notice that the Drools download page has a link to older versions.

Maybe, just maybe, there's a slight chance following the link will lead you
to what you seek.

I don't know it must be worth a try. The internet is full of these links
and they seem to go to useful places.

With kind regards,

Mike

On 26 July 2012 16:11, abhinay_agarwal abhinay_agar...@infosys.com wrote:

 i cannot upgrade to guvnor 5.4...

 need pluging for guvnor 5.3 final



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

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


[rules-users] Apply role to whole class hierarchy

2012-07-26 Thread Joerg Henne
Hi all,

we are processing events through a Fusion rule base. To be recognized as
such, model classes must be declared as @role(event). We are using a rather
extensive hierarchy of events, all derived from a single abstract class.
Unfortunately, it doesn't seem to be possible to declare just this base
class as an event and have the 'event' role for the others derived from
that.
Is there a way around having to declare each and every single event class
separately?

Thanks
Joerg



--
View this message in context: 
http://drools.46999.n3.nabble.com/Apply-role-to-whole-class-hierarchy-tp4018930.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] Apply role to whole class hierarchy

2012-07-26 Thread Edson Tirelli
   Derived classes should inherit the @role of parent classes... which
version of Drools are you using?

   Edson

On Thu, Jul 26, 2012 at 12:48 PM, Joerg Henne hennejg+nab...@googlemail.com
 wrote:

 Hi all,

 we are processing events through a Fusion rule base. To be recognized as
 such, model classes must be declared as @role(event). We are using a rather
 extensive hierarchy of events, all derived from a single abstract class.
 Unfortunately, it doesn't seem to be possible to declare just this base
 class as an event and have the 'event' role for the others derived from
 that.
 Is there a way around having to declare each and every single event class
 separately?

 Thanks
 Joerg



 --
 View this message in context:
 http://drools.46999.n3.nabble.com/Apply-role-to-whole-class-hierarchy-tp4018930.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




-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Guvnor: Accessing Bound Variable in Then Statement

2012-07-26 Thread Vann_the_Red
Hello.  I started with a search and didn't find an answer.  I apologize if my
search-fu was lacking today.

I'm a non-developer tasked with rules creation and testing using guvnor.  I
have found some scenarios where I can bind a variable to either the whole
input model or a fact in the input model and then later access those in the
output model by selecting Bound Variable from the popup box in the Then
statement.  In other scenarios, Bound Variable is not an option (only
Literal or Formula).  What must I do to be able to access the bound
variables from the When statement(s) in the Then statement(s)?

TIA,

Vann

This is a repost because I wasn't on the mailing list yet and I gather most
didn't see it.  Apologies again.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-Accessing-Bound-Variable-in-Then-Statement-tp4018932.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: Accessing Bound Variable in Then Statement

2012-07-26 Thread Vann_the_Red
Mods, please delete.  Superceded by new thread now that I'm on the mailing
list.  Thank you.



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-Accessing-Bound-Variable-in-Then-Statement-tp4018905p4018933.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 reports Invalid Gateway direction for Parallel Gateway.

2012-07-26 Thread Tihomir Surdilovic
Try with Designer 2.3.0.Final which was just released: 
http://blog.athico.com/2012/07/jbpm-designer-230final-released.html
This should not be an issue with that version. If for some reason it 
still is, open a jBPM Jira with the BPMN2 of your process generated with 
the Eclipse editor so we can take a look.


Hope this helps.
Tihomir
On 7/26/12 5:59 PM, xmithj wrote:
A business process with a parallel path (see attached diagram) created 
through the Eclipse plug-in and imported later to Guvnor or just 
created from scratch inside Guvnor, doesn't pass the Guvnor's Validate 
Process. Guvnor reports:
Invalid Gateway direction for Parallel Gateway. It should be 
'Converging or Diverging.


How can I specify it should be a converging gateway?

I am using JBPM 5.3 Final installer which uses: 
guvnor-distribution-wars-5.4.0-20120516.war designer-2.2.Final-jboss7.war


Thanks in advance for help.

Guvnor BPMN2 Process with parallel path

View this message in context: Guvnor reports Invalid Gateway direction 
for Parallel Gateway. 
http://drools.46999.n3.nabble.com/Guvnor-reports-Invalid-Gateway-direction-for-Parallel-Gateway-tp4018934.html
Sent from the Drools: User forum mailing list archive 
http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html 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] Guvnor reports Invalid Gateway direction for Parallel Gateway.

2012-07-26 Thread xmithj
Hi Tihomir,

Thanks a lot for your help. I have tried the Designer 2.3.0.Final and
Guvnor's Validate Process passed!

However I am facing a new problem:  Although I can see the Service Tasks
icons in the palette (see attached picture), the icons are not displayed
anymore in the business process diagram, and a FileNotFoundException is
thrown every time I try to place one of these Service Tasks into the canvas.
Please see the exception and tell me whether I missed something in the
installation/replacement of the Designer.

http://drools.46999.n3.nabble.com/file/n4018937/IconsNotDisplayed.png 
http://drools.46999.n3.nabble.com/file/n4018937/iconsException.txt
iconsException.txt 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-reports-Invalid-Gateway-direction-for-Parallel-Gateway-tp4018934p4018937.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 reports Invalid Gateway direction for Parallel Gateway.

2012-07-26 Thread Tihomir Surdilovic
It looks as you did not clear your browser cache before using the new 
version. Do that and try again - let me know if the issue persists.


Thanks.
On 7/27/12 12:17 AM, xmithj wrote:

Hi Tihomir,
Thanks a lot for your help. I have tried the Designer 2.3.0.Final and 
Guvnor's Validate Process passed!
However I am facing a new problem: Although I can see the Service 
Tasks icons in the palette (see attached picture), the icons are not 
displayed anymore in the business process diagram, and a 
FileNotFoundException is thrown every time I try to place one of these 
Service Tasks into the canvas. Please see the exception and tell me 
whether I missed something in the installation/replacement of the 
Designer.


BPMN2 Process doesn't show icons iconsException.txt 
http://drools.46999.n3.nabble.com/file/n4018937/iconsException.txt


View this message in context: Re: [rules-users] Guvnor reports Invalid 
Gateway direction for Parallel Gateway. 
http://drools.46999.n3.nabble.com/Guvnor-reports-Invalid-Gateway-direction-for-Parallel-Gateway-tp4018934p4018937.html
Sent from the Drools: User forum mailing list archive 
http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html 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 global variable in DRL file

2012-07-26 Thread zeeshan
Hi Laune and thanks for replying

Actually it was not just 50,000, it was 1,00,000 records in single CSV that
we solved the Heap space problem by your help and we have developed that
product and successfuly integrated in Liferay Portal... :)

Now in this case, we have to read* three CSV files* having *1800,12k and
9.5k* records. Now our concern is that if it was running fine for 100
thousand records then why it is creating problem data which is much lesser
than 100 thousand. 

Actually we are thinking in the direction like, it might creating problem
because increased number of columns in each of three CSV files that we are
using compare to that 100 thousand records in which we had 8 columns but
only one file. 

Another concern is ,there may be possibility that as we are generating
objects from 3 CSV one after another then firing rules might creating
problem...??  Please help us in finding out what is the reason for this
problemPlease find the Rulemain.java and Sample .drl file which u asked
me to provide

thanks !!

http://drools.46999.n3.nabble.com/file/n4018939/RuleMain.java RuleMain.java 
http://drools.46999.n3.nabble.com/file/n4018939/RuleRunner.java
RuleRunner.java  http://drools.46999.n3.nabble.com/file/n4018939/Sample.drl
Sample.drl 




--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-global-variable-in-DRL-file-tp4018911p4018939.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 reports Invalid Gateway direction for Parallel Gateway.

2012-07-26 Thread xmithj
Clearing my browser cache fixed the icons problems. Thanks a lot!



--
View this message in context: 
http://drools.46999.n3.nabble.com/Guvnor-reports-Invalid-Gateway-direction-for-Parallel-Gateway-tp4018934p4018940.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