[rules-users] How to integrate Drools application with Servlet

2012-09-27 Thread zeeshan
Hi All !

I have an existing web application Bonus Calculation Management System
which has been developed in servlet and Hibernate which is interacting with
DB. I have developed a product in Drools using Struts. Now the task is I
have to integrate this drools product in the Existing Servlet application. I
have integrating it converting Struts to Servlet. But it is giving this
exception about my Rule File :

*
com.drools.action.PolicyAction
hurr
java.io.FileNotFoundException: Cannot find rule file:Sample.drl
at com.drools.facts.RuleRunner.loadRuleFile(RuleRunner.java:89)
at com.drools.facts.RuleRunner.loadRules(RuleRunner.java:67)
at com.drools.facts.RuleRunner.getStatefulSession(RuleRunner.java:227)
at com.drools.facts.RuleMain.main(RuleMain.java:46)*

*In my Servlet class I have written like this :*  public int
calculate(HttpServletRequest req, String schId,String schStepID, Date
clcFrDate, Date clcToDate,String runNo)
{

System.out.println(hurr);
InputFormBean inputFormBean=new InputFormBean();
inputFormBean.setFromDate(clcFrDate.toString()); 
inputFormBean.setToDate(clcToDate.toString());
String 
fromDateArray[]=inputFormBean.getFromDate().trim().split(/);
String 
toDateArray[]=inputFormBean.getToDate().trim().split(/);

inputFormBean.setFromDateArray(fromDateArray);
inputFormBean.setToDateArray(toDateArray);
RuleMain ruleMain=new RuleMain();
try {
ruleMain.main(inputFormBean);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return 0;

}


*In the RuleMain.java*  :public class RuleMain extends HttpServlet  {



private  final String[] RULES_FILES8 = new String[] {Sample.drl}; // 
*I
also tried : com.drools.rules/Sample.drl but dint work*

static HashMapInteger, DoubleagntAPEMap=new HashMapInteger, 
Double();

public  void main(InputFormBean inputFormBean) throws Exception {


HashMapString, Object globals = new HashMapString, Object();
//globals.put(index, new Index(0));

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




Thanks !!!




--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-integrate-Drools-application-with-Servlet-tp4019986.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 integrate Drools application with Servlet

2012-09-27 Thread zeeshan
Hi Esteban and Himansu and thanks for replying.

Esteban : I have one doubt. When I did it using struts, I simply gave the
fully qualified path of my DRL file and it was working fine after that. The
method that u gave me, is it specific in the case of Servlet??


Himansu : Sall I put my DRL file directly into the src folder and put the
address in my RuleMain.java...???



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-integrate-Drools-application-with-Servlet-tp4019986p4020003.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 integrate Drools application with Servlet

2012-09-27 Thread zeeshan
Thanks guysIts reading now. I simply put the DRL file in src folder and
gave the address in RuleMain.java..  * private  final String[]
RULES_FILES8 = new String[] {/Sample.drl};*



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-integrate-Drools-application-with-Servlet-tp4019986p4020005.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-30 Thread zeeshan
HI Laune,

Thanks for ur solutions, first one working fine but* we want agentAPE value
for other rules or atleast we want them on RuleMain.java*(where we create
agent csv bean objects).

Your second solution when we implemented was throwing NULL Pointer
Exception.

Laune can u suggest us way in which we can solve problem related to first
solution 
and if possible can we move with second one.


Thanks





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

Hi Laune !

I am using 5.4 version. When I tried ur second solution, it gives
*NullPointerException*. 

Below is Stack trace and also please find my Rule file.




*WARNING: Unhandled Exception thrown: class java.lang.NullPointerException
Jul 30, 2012 2:01:18 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet action threw exception
java.lang.NullPointerException
at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:451)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:435)
at com.drools.facts.RuleRunner.loadRules(RuleRunner.java:71)
at com.drools.facts.RuleRunner.getStatefulSession(RuleRunner.java:227)
at com.drools.facts.RuleMain.main(RuleMain.java:43)
at com.drools.action.PolicyAction.execute(PolicyAction.java:25)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
*



laune wrote
 
 Could you please post the exact code of your rule with solution #2 and
 the NPE stack trace? You're using Drools 5.4.0?
 
 This works with 5.4.0 - notice the no-loop true. $sum has class
 Number, this needs intValue() (or whatever) to match the parameter
 type of the setter.
 
 rule accumulate Policy values into Agent
 no-loop true
 when
 $a: Agent( $id: id )
 accumulate( Policy( agentId == $id, $v: value ); $sum: sum( $v ) )
 then
 modify( $a ){ setValue( $sum.intValue() ) }
 System.out.println( $a.toString() );
 end
 
 
 
 On 30/07/2012, zeeshan lt;zeeshan.spring@gt; wrote:
 HI Laune,

 Thanks for ur solutions, first one working fine but* we want agentAPE
 value
 for other rules or atleast we want them on RuleMain.java*(where we create
 agent csv bean objects).

 Your second solution when we implemented was throwing NULL Pointer
 Exception.

 Laune can u suggest us way in which we can solve problem related to first
 solution
 and if possible can we move with second one.


 Thanks





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

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



http://drools.46999.n3.nabble.com/file/n4018960/Sample.drl Sample.drl 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-global-variable-in-DRL-file-tp4018911p4018960.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-27 Thread zeeshan
Hi Laune !

I applied your suggested changes but the loop is running infinitely and same
policyAPE is used to generated cumulated value I mean for 1 agent it is
expected that all the policy APEs should sum up to generate Agent APE but
same policy APE getting summed up infinitely.plz find attached of my
consolewe printing in console in following order ---  *
System.out.println($agAPE+ZZeeesshhaaannn+$polAPE);*

Also find my updated RuleMain and Sample.DRL...


thanks very much again !

http://drools.46999.n3.nabble.com/file/n4018946/Sample.drl Sample.drl 
http://drools.46999.n3.nabble.com/file/n4018946/console_snapshot.png
console_snapshot.png 
http://drools.46999.n3.nabble.com/file/n4018946/RuleMain.java RuleMain.java 



--
View this message in context: 
http://drools.46999.n3.nabble.com/Using-global-variable-in-DRL-file-tp4018911p4018946.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-27 Thread zeeshan
Hi Laune !


  Thanks for ur solution , I resolved the heap Size problem with
your solution but even using *no-loop* is not helping in solving infinite
loop issue . Can u suggest why it is not accessing other agent objects and
simply updating same agent object infinite times..After adding no-loop,
console shows



*6.902394919998737E7ZZeeesshhaaannn1881.4
6.902583059998737E7ZZeeesshhaaannn2802.0
6.902863259998737E7ZZeeesshhaaannn1881.4
6.90305138738E7ZZeeesshhaaannn2802.0
6.90333158738E7ZZeeesshhaaannn1881.4
6.903519739998738E7ZZeeesshhaaannn2802.0
6.903799939998738E7ZZeeesshhaaannn1881.4
6.903988079998739E7ZZeeesshhaaannn2802.0
6.904268279998739E7ZZeeesshhaaannn1881.4
6.90445641999874E7ZZeeesshhaaannn2802.0
6.90473661999874E7ZZeeesshhaaannn1881.4
6.90492475999874E7ZZeeesshhaaannn2802.0
6.90520495999874E7ZZeeesshhaaannn1881.4
6.90539308741E7ZZeeesshhaaannn2802.0
6.90567328741E7ZZeeesshhaaannn1881.4
6.905861439998741E7ZZeeesshhaaannn2802.0
6.906141639998741E7ZZeeesshhaaannn1881.4
6.906329779998742E7ZZeeesshhaaannn2802.0
6.906609979998742E7ZZeeesshhaaannn1881.4
6.906798119998743E7ZZeeesshhaaannn2802.0
6.907078319998743E7ZZeeesshhaaannn1881.4
6.907266459998743E7ZZeeesshhaaannn2802.0
6.907546659998743E7ZZeeesshhaaannn1881.4
6.90773478744E7ZZeeesshhaaannn2802.0
6.90801498744E7ZZeeesshhaaannn1881.4
6.908203139998744E7ZZeeesshhaaannn2802.0
6.908483339998744E7ZZeeesshhaaannn1881.4
6.908671479998745E7ZZeeesshhaaannn2802.0
6.908951679998745E7ZZeeesshhaaannn1881.4
6.909139819998746E7ZZeeesshhaaannn2802.0
6.909420019998746E7ZZeeesshhaaannn1881.4
*
laune wrote
 
 Sorry, I think I missed this, all you  need is a no-loop in the rule :)
 -W
 
 
 
 On 27/07/2012, zeeshan lt;zeeshan.spring@gt; wrote:
 Hi Laune !

 I applied your suggested changes but the loop is running infinitely and
 same
 policyAPE is used to generated cumulated value I mean for 1 agent it is
 expected that all the policy APEs should sum up to generate Agent APE but
 same policy APE getting summed up infinitely.plz find attached of my
 consolewe printing in console in following order ---  *
 System.out.println($agAPE+ZZeeesshhaaannn+$polAPE);*

 Also find my updated RuleMain and Sample.DRL...


 thanks very much again !

 http://drools.46999.n3.nabble.com/file/n4018946/Sample.drl Sample.drl
 http://drools.46999.n3.nabble.com/file/n4018946/console_snapshot.png
 console_snapshot.png
 http://drools.46999.n3.nabble.com/file/n4018946/RuleMain.java
 RuleMain.java




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

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




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


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


[rules-users] How to write Hibernate query lang(HQL) in .DRL file

2012-07-10 Thread zeeshan
Hi !

According to my requirement I need to fetch and Insert data from database
using Hibernate Query from .DRL file.
I have idea how to execute HQL in Plain Java class but according to my
requirement,I need to fire query to database from .DRL file which I tried
but unable to get output instead I was getting errors.

  Can anyone suggest me process to execute Hibernate Query from DRL file
or please provide me some sample code or any link.

Thanks !!

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-write-Hibernate-query-lang-HQL-in-DRL-file-tp4018571.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] Hibernate Configuration with Drools 5.4

2012-07-02 Thread zeeshan
Hi Laune !

Finally I am able to read 100 thousand records as rule through reading CSV.
Thanks very very much for your precious time. I would also like to thank
Mike and other guys who have contributed in this thread.

Thanks !!!  :)






--
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4018388.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] Hibernate Configuration with Drools 5.4

2012-06-19 Thread zeeshan
Hi Laune,

 

Thanks very much for your response.  We would like to try and implement
Option 3.

We assume that the implementation involves setting up individual rows in the
excel as a collection of objects and using the From keyword to look up the
output value/row we want based on the input parameter values.  Is it
possible for you to share the relevant code you have created to implement
this option?

Thanks !


--
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4018051.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] Hibernate Configuration with Drools 5.4

2012-06-19 Thread zeeshan
Hi Chris !

If you can elaborate it more, I will really try to implement it. I was just
started giving a try to Laune's way.

thanks !!

--
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4018056.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] Hibernate Configuration with Drools 5.4

2012-06-18 Thread zeeshan
*Hi Vincent !

50k records is very less for the projects scaling over 1 lac(100k) records
and when I started working on Drools, I was assured with performance and
ease in developing business rule. But if xls format(DTs) not even supporting
26k records , how can I implement it for client requirement.

  Initially after Heap size, I was successful in running 26k
records. After few trials ,it stopped supporting 26k and we have to scale
down to 3.5k. That is why I was asking to tell me some alternate solution to
rectify this problem because if it can run for 26k initially, then it should
continue running with the same or more number of records.

So kindly help me in solving this issue which me and my team
struggling for a 2 weeks and with your help I am sure we can solve this
problem which would be help not only for me but also for this WHOLE
COMMUNITY.

Thanks !!!*

--
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4018040.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] Hibernate Configuration with Drools 5.4

2012-06-15 Thread zeeshan
Hi All !

I want to use Hibernate for database persistence in my drools project.
Please suggest me the steps. I am using 5.4.0 final version. Which version
of hibernate I shall use whether 3.1 or Annotation one.?? I have idea
about 3.1. Actually I am having 50,000 records in one of my Decision table,
so it is taking too much time to give the result. Now I have decided to use
move this to database. So please tell me configuration steps.

Thanks !!

--
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981.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] Hibernate Configuration with Drools 5.4

2012-06-15 Thread zeeshan
Hi Mike and thanks for replying !

Actually I am planning to store rules in database because calling from excel
sheet effects performance drastically. So kindly guide me to migrate excel
sheet rules to database using Hibernate or please suggest me other possible
options.

Thanks !!

--
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4017990.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] Hibernate Configuration with Drools 5.4

2012-06-15 Thread zeeshan
Hi Laune and thanks for replying !

We have a set of Insurance Rate Tables setup as Drools Decision tables. One
of these is large – 50,000 rows – These are setup as individual line items
in a single Decision table [four parameters whose input value leads to a
result value].  We notice that while loading the decision tables, if load
the entire 50,000 row decision table, we get a Java heap size error. 
*java.lang.outOfMemory: java Heap size*  
We also tried the following :

Increased the heap space in Eclipse by *-Xms1024m -Xmx1024m
-XX:+UseParallelGC
-XX:PermSize=512M
-XX:MaxPermSize=512M*, also in *eclipse.ini* file changed the *Perm size
from 256 to 512 MB*, also changed in *catalina.bat* file in Tomcat folder.
For one full day after the changes we had done, it was working fine with
50,000 rows in a decision file. Suddenly after two days we were shocked to
see the same error  :(   So then We thought to move the rules i.e.
decision table to Database and thought of *Hibernate or iBatis*.

Could you advise how we can resolve this issue. Also, we are thinking of
moving this large rate table to a database and write a SELECT to get back
the result.  Please advise on this alternative as well.

--
View this message in context: 
http://drools.46999.n3.nabble.com/Hibernate-Configuration-with-Drools-5-4-tp4017981p4017993.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't put formula on Guvnor screen

2012-06-09 Thread zeeshan
Thanks Mike !

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-can-t-put-formula-on-Guvnor-screen-tp3987830p4017832.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 HEAP space error when decision table contains 26000 records

2012-06-08 Thread zeeshan
I have increased the Eclipse size to 1024 MB.also increased Tomcat
size..still not working...

--
View this message in context: 
http://drools.46999.n3.nabble.com/getting-HEAP-space-error-when-decision-table-contains-26000-records-tp4017806p4017813.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't put formula on Guvnor screen

2012-06-08 Thread zeeshan
Hi Mike !

Will it be OK to go with *5.5.0-SNAPSHOT*.??  Is formula part in
5.5.0-SNAPSHOT of THEN working..??


Thanks !

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-can-t-put-formula-on-Guvnor-screen-tp3987830p4017829.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 Guided Editor

2012-06-07 Thread zeeshan
Hi Amrita !

refer to this link --- 
http://drools.46999.n3.nabble.com/rules-users-can-t-put-formula-on-Guvnor-screen-td3987830.
 
http://drools.46999.n3.nabble.com/rules-users-can-t-put-formula-on-Guvnor-screen-td3987830.
 

there was possibly a bug in 5.4 CR1 that has been fixed by Mark in some
other version..read the replies in the above given link...u will the
answer.

thanks

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-Guvnor-Guided-Editor-tp4017804p4017805.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] getting HEAP space error when decision table contains 26000 records

2012-06-07 Thread zeeshan
Hi All !

Please find the attached Decision table which contains 26000 records. It is
giving Heap space error. When I tested with few hundred records inn the tale
it works fine. Though my Eclipse helios shows ample amount of memory i.e.
426 M.  Shall I increase more??  If so, how.??

Thanks !! http://drools.46999.n3.nabble.com/file/n4017806/Premium_Rates.csv
Premium_Rates.csv  http://drools.46999.n3.nabble.com/file/n4017806/error.png 

--
View this message in context: 
http://drools.46999.n3.nabble.com/getting-HEAP-space-error-when-decision-table-contains-26000-records-tp4017806.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] getting mismatched '==' error

2012-05-29 Thread zeeshan
Hi !

Please find my attached Decision Table. I am getting following error...


log4j:WARN No appenders could be found for logger (com.sample.RuleRunner).
log4j:WARN Please initialize the log4j system properly.
Warning:  Cell at E20 not present - adding a blank
Warning:  Cannot read name ranges for Excel_BuiltIn__FilterDatabase_1 -
setting to empty
Warning:  Cannot read name ranges for Excel_BuiltIn__FilterDatabase_1 -
setting to empty
Warning:  Cannot read name ranges for Excel_BuiltIn__FilterDatabase_1 -
setting to empty
Exception in thread main org.drools.rule.InvalidRulePackage: [10,9]: [ERR
102] Line 10:9 mismatched input '==' in rule Distribution Cost Rules_11
[23,9]: [ERR 102] Line 23:9 mismatched input '==' in rule Distribution Cost
Rules_12
[36,9]: [ERR 102] Line 36:9 mismatched input '==' in rule Distribution Cost
Rules_13
[49,9]: [ERR 102] Line 49:9 mismatched input '==' in rule Distribution Cost
Rules_14
[62,9]: [ERR 102] Line 62:9 mismatched input '==' in rule Distribution Cost
Rules_15
[75,9]: [ERR 102] Line 75:9 mismatched input '==' in rule Distribution Cost
Rules_16
[88,9]: [ERR 102] Line 88:9 mismatched input '==' in rule Distribution Cost
Rules_17
[101,9]: [ERR 102] Line 101:9 mismatched input '==' in rule Distribution
Cost Rules_18
[114,9]: [ERR 102] Line 114:9 mismatched input '==' in rule Distribution
Cost Rules_19
[127,9]: [ERR 102] Line 127:9 mismatched input '==' in rule Distribution
Cost Rules_20
[140,9]: [ERR 102] Line 140:9 mismatched input '==' in rule Distribution
Cost Rules_21
[153,9]: [ERR 102] Line 153:9 mismatched input '==' in rule Distribution
Cost Rules_22
[166,9]: [ERR 102] Line 166:9 mismatched input '==' in rule Distribution
Cost Rules_23
[179,9]: [ERR 102] Line 179:9 mismatched input '==' in rule Distribution
Cost Rules_24
[192,9]: [ERR 102] Line 192:9 mismatched input '==' in rule Distribution
Cost Rules_25
[205,9]: [ERR 102] Line 205:9 mismatched input '==' in rule Distribution
Cost Rules_26
[218,9]: [ERR 102] Line 218:9 mismatched input '==' in rule Distribution
Cost Rules_27
[231,9]: [ERR 102] Line 231:9 mismatched input '==' in rule Distribution
Cost Rules_28
[244,9]: [ERR 102] Line 244:9 mismatched input '==' in rule Distribution
Cost Rules_29
[257,9]: [ERR 102] Line 257:9 mismatched input '==' in rule Distribution
Cost Rules_30
[270,9]: [ERR 102] Line 270:9 mismatched input '==' in rule Distribution
Cost Rules_31
[283,9]: [ERR 102] Line 283:9 mismatched input '==' in rule Distribution
Cost Rules_32
[296,9]: [ERR 102] Line 296:9 mismatched input '==' in rule Distribution
Cost Rules_33
[309,9]: [ERR 102] Line 309:9 mismatched input '==' in rule Distribution
Cost Rules_34
[0,0]: Parser returned a null Package

at org.drools.rule.Package.checkValidity(Package.java:471)
at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:481)
at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:436)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:443)
at com.sample.RuleRunner.loadRules(RuleRunner.java:70)
at com.sample.RuleRunner.runStatelessRules(RuleRunner.java:185)
at com.sample.RuleMain.main(RuleMain.java:132)
http://drools.46999.n3.nabble.com/file/n4017627/Distribution_Factor.xls
Distribution_Factor.xls 

--
View this message in context: 
http://drools.46999.n3.nabble.com/getting-mismatched-error-tp4017627.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 mismatched '==' error

2012-05-29 Thread zeeshan
Hi Mike !

Still getting  the same error :( please find the attached file...

log4j:WARN No appenders could be found for logger (com.sample.RuleRunner).
log4j:WARN Please initialize the log4j system properly.
Warning:  Cell at E20 not present - adding a blank
Warning:  Cannot read name ranges for Excel_BuiltIn__FilterDatabase_1 -
setting to empty
Warning:  Cannot read name ranges for Excel_BuiltIn__FilterDatabase_1 -
setting to empty
Warning:  Cannot read name ranges for ClaimTypes - setting to empty
Warning:  Cannot read name ranges for Excel_BuiltIn__FilterDatabase_1 -
setting to empty
Warning:  Cannot read name ranges for Excel_BuiltIn__FilterDatabase_2 -
setting to empty
Exception in thread main org.drools.rule.InvalidRulePackage: [10,9]: [ERR
102] Line 10:9 mismatched input '==' in rule Distribution Cost Rules_11
[23,9]: [ERR 102] Line 23:9 mismatched input '==' in rule Distribution Cost
Rules_12
[36,9]: [ERR 102] Line 36:9 mismatched input '==' in rule Distribution Cost
Rules_13
[49,9]: [ERR 102] Line 49:9 mismatched input '==' in rule Distribution Cost
Rules_14
[62,9]: [ERR 102] Line 62:9 mismatched input '==' in rule Distribution Cost
Rules_15
[75,9]: [ERR 102] Line 75:9 mismatched input '==' in rule Distribution Cost
Rules_16
[88,9]: [ERR 102] Line 88:9 mismatched input '==' in rule Distribution Cost
Rules_17
[101,9]: [ERR 102] Line 101:9 mismatched input '==' in rule Distribution
Cost Rules_18
[114,9]: [ERR 102] Line 114:9 mismatched input '==' in rule Distribution
Cost Rules_19
[127,9]: [ERR 102] Line 127:9 mismatched input '==' in rule Distribution
Cost Rules_20
[140,9]: [ERR 102] Line 140:9 mismatched input '==' in rule Distribution
Cost Rules_21
[153,9]: [ERR 102] Line 153:9 mismatched input '==' in rule Distribution
Cost Rules_22
[166,9]: [ERR 102] Line 166:9 mismatched input '==' in rule Distribution
Cost Rules_23
[179,9]: [ERR 102] Line 179:9 mismatched input '==' in rule Distribution
Cost Rules_24
[192,9]: [ERR 102] Line 192:9 mismatched input '==' in rule Distribution
Cost Rules_25
[205,9]: [ERR 102] Line 205:9 mismatched input '==' in rule Distribution
Cost Rules_26
[218,9]: [ERR 102] Line 218:9 mismatched input '==' in rule Distribution
Cost Rules_27
[231,9]: [ERR 102] Line 231:9 mismatched input '==' in rule Distribution
Cost Rules_28
[244,9]: [ERR 102] Line 244:9 mismatched input '==' in rule Distribution
Cost Rules_29
[257,9]: [ERR 102] Line 257:9 mismatched input '==' in rule Distribution
Cost Rules_30
[270,9]: [ERR 102] Line 270:9 mismatched input '==' in rule Distribution
Cost Rules_31
[283,9]: [ERR 102] Line 283:9 mismatched input '==' in rule Distribution
Cost Rules_32
[296,9]: [ERR 102] Line 296:9 mismatched input '==' in rule Distribution
Cost Rules_33
[309,9]: [ERR 102] Line 309:9 mismatched input '==' in rule Distribution
Cost Rules_34
[0,0]: Parser returned a null Package

at org.drools.rule.Package.checkValidity(Package.java:471)
at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:481)
at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:436)
at org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:443)
at com.sample.RuleRunner.loadRules(RuleRunner.java:70)
at com.sample.RuleRunner.runStatelessRules(RuleRunner.java:185)
at com.sample.RuleMain.main(RuleMain.java:132)
http://drools.46999.n3.nabble.com/file/n4017643/Distribution_Factor.xls
Distribution_Factor.xls 


--
View this message in context: 
http://drools.46999.n3.nabble.com/getting-mismatched-error-tp4017627p4017643.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 mismatched '==' error

2012-05-29 Thread zeeshan
I tried ur suggestion.still same error. :(

I think I will have to create a new Excel file

--
View this message in context: 
http://drools.46999.n3.nabble.com/getting-mismatched-error-tp4017627p4017655.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 mismatched '==' error

2012-05-29 Thread zeeshan
Hi Vincent !

I solved the error by writing a new file :)  may be some unseen
error

but it is not taking taking Policy Year more than 1. as i have given
year values 2,99 separate rule and for 1 year separate rule.

Thanks !!

--
View this message in context: 
http://drools.46999.n3.nabble.com/getting-mismatched-error-tp4017627p4017659.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] Getting error in my Decision Table

2012-05-28 Thread zeeshan
Hi !

I am getting error in my decision tableplease verify it...I am attaching
my file http://drools.46999.n3.nabble.com/file/n4017588/111.png 
http://drools.46999.n3.nabble.com/file/n4017588/Distribution_Cost.xls
Distribution_Cost.xls 

--
View this message in context: 
http://drools.46999.n3.nabble.com/Getting-error-in-my-Decision-Table-tp4017588.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 error in my Decision Table

2012-05-28 Thread zeeshan
Thanks Mike n Bharadwaj...its working now..I gave 6,99...

--
View this message in context: 
http://drools.46999.n3.nabble.com/Getting-error-in-my-Decision-Table-tp4017588p4017604.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't put formula on Guvnor screen

2012-05-24 Thread zeeshan
Hi Mike !

Its working on 5.4.0 Beta1
thanks !

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-can-t-put-formula-on-Guvnor-screen-tp3987830p4013151.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 put Power in Formula box of THEN ?

2012-05-24 Thread zeeshan
Hi !

Can I put Power in Fromula box of THEN part...??

this is the formula that I have to apply

I want to put this formula in THEN section    
  
  *deathBenefit=sumAssured * [(1 - 1/(1 +
(interestRate/100)^(policyTerm-policyYear+1) / 1 -  1/(1 +
(interestRate/100)^(policyTerm) ]*

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154.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 put Power in Formula box of THEN ?

2012-05-24 Thread zeeshan
Hi Mike and many thanks for replying !

shall I use *Math.pow* in free form DRL of THEN or can I use in Formula
Box...???

thanks !!







--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4013297.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 put Power in Formula box of THEN ?

2012-05-24 Thread zeeshan
Hi Mike !

I have decomposed the formula into several small partsI was trying with
Free form DRL, then I validated it...it is giving error

*[DeathBenefitRule] Unable to Analyse Expression int
$interestNumerator=1+($deathBenefit.getInterestRate()/100); int
$interestRateNumerator=1; int
condition=$deathBenefit.getPolicyTerm()-$deathBenefit.getPolicYear()+1;
for(int i=0; i=condition; ++i ){
$interestRateNumerator=$interestRateNumerator*$interestNumerator; }; double
numerator=1-1/$interestRateNumerator; System.out.println(numerator);:
[Error: no such identifier: condition] [Near : {... for(int i=0;
i=condition; ++i ){ }] ^ [Line: 6, Column: 17]*



I put this in the box---   

*int $interestNumerator=1+($deathBenefit.getInterestRate()/100);
int $interestRateNumerator=1;
 
int condition=$deathBenefit.getPolicyTerm()-$deathBenefit.getPolicYear()+1;

for(int i=0; i=condition; ++i ){
  $interestRateNumerator=$interestRateNumerator*$interestNumerator;

}
double numerator=1-1/$interestRateNumerator;
System.out.println(numerator);*






--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4013418.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 put Power in Formula box of THEN ?

2012-05-24 Thread zeeshan
Hi Mike !

I have decomposed the formula into several small parts
http://drools.46999.n3.nabble.com/file/n4013423/error.png I was trying
with Free form DRL, then I validated it...it is giving error

*[DeathBenefitRule] Unable to Analyse Expression int
$interestNumerator=1+($deathBenefit.getInterestRate()/100); int
$interestRateNumerator=1; int
condition=$deathBenefit.getPolicyTerm()-$deathBenefit.getPolicYear()+1;
for(int i=0; i=condition; ++i ){
$interestRateNumerator=$interestRateNumerator*$interestNumerator; }; double
numerator=1-1/$interestRateNumerator; System.out.println(numerator);:
[Error: no such identifier: condition] [Near : {... for(int i=0;
i=condition; ++i ){ }] ^ [Line: 6, Column: 17]*



I put this in the box---   

*int $interestNumerator=1+($deathBenefit.getInterestRate()/100);
int $interestRateNumerator=1;
 
int condition=$deathBenefit.getPolicyTerm()-$deathBenefit.getPolicYear()+1;

for(int i=0; i=condition; ++i ){
  $interestRateNumerator=$interestRateNumerator*$interestNumerator;

}
double numerator=1-1/$interestRateNumerator;
System.out.println(numerator);*






--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4013423.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 put Power in Formula box of THEN ?

2012-05-24 Thread zeeshan
Hi Laune and thanks for replying !!

*1.* I am using *5.4.0 Beta* 1... I also tried by using *Math.pow* as Mike
posted above but by validating got error... *[DeathBenefitRule] Unable to
Analyse Expression $deathBenefit.setSumAssured( sumAssured*(1-1/
Math.pow((1+(interestRate/100),policyTerm-policYear+1)/1-1/(Math.pow(1+(interestRate/100),policyTerm)
); drools.update( $deathBenefit );: [Error: unbalanced braces ( ... )] [Near
: {... enefit.setSumAssured( sumAssured*(1-1/ Math.pow((1 }] ^ [Line: 1,
Column: 28]*


*2.* This I put in the Formula box  --  *=sumAssured*(1-1/
Math.pow((1+(interestRate/100),policyTerm-policYear+1)/1-1/(Math.pow(1+(interestRate/100),policyTerm)*


*3.* This is generated source code  ---  1*.   |   rule DeathBenefitRule
2.  |   dialect mvel
3.  |   when
4.  |   $deathBenefit : DeathBenefitFactModel( $sumAssured :
sumAssured, $interestRate : interestRate, $policYear : policYear,
$policyTerm : policyTerm)
5.  |   then
6.  |   $deathBenefit.setSumAssured( sumAssured*(1-1/
Math.pow((1+(interestRate/100),policyTerm-policYear+1)/1-1/(Math.pow(1+(interestRate/100),policyTerm)
);
7.  |   update( $deathBenefit );
8.  |   end*

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4013466.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 put Power in Formula box of THEN ?

2012-05-24 Thread zeeshan
Hi Mike !

I tried with prefix $ too on the RHS, still giving error

*[DeathBenefitRule] Unable to Analyse Expression
$deathBenefit.setSumAssured( sumAssured * ( 1 - (1 / (Math.pow ( (1 +
($interestRate/100),$policyTerm-$policYear+1) ) ) ) ) / (1 - (1 / (Math.pow
( (1 + ($interestRate/100),$policyTerm) ) ) ) ) ); drools.update(
$deathBenefit );: [Error: unable to resolve method using strict-mode:
org.drools.spi.KnowledgeHelper.sumAssured()] [Near : {...
efit.setSumAssured( sumAssured * ( 1 - (1 / (Math. }] ^ [Line: 1,
Column: 30]*


the sorce code *1. |   rule DeathBenefitRule
2.  |   dialect mvel
3.  |   when
4.  |   $deathBenefit : DeathBenefitFactModel( $sumAssured :
sumAssured, $interestRate : interestRate, $policYear : policYear,
$policyTerm : policyTerm)
5.  |   then
6.  |   $deathBenefit.setSumAssured( sumAssured * ( 1 - (1 / 
(Math.pow
( (1 + ($interestRate/100),$policyTerm-$policYear+1) ) ) ) ) / (1 - (1 /
(Math.pow ( (1 + ($interestRate/100),$policyTerm) ) ) ) ) );
7.  |   update( $deathBenefit );
8.  |   end*

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4013548.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 put Power in Formula box of THEN ?

2012-05-24 Thread zeeshan
oops..now I tried by putting $ before sumAssuredstill same error 
*[DeathBenefitRule] Unable to Analyse Expression
$deathBenefit.setSumAssured( $sumAssured * ( 1 - (1 / (Math.pow ( (1 +
($interestRate/100),$policyTerm-$policYear+1) ) ) ) ) / (1 - (1 / (Math.pow
( (1 + ($interestRate/100),$policyTerm) ) ) ) ) ); drools.update(
$deathBenefit );: [Error: unable to resolve method using strict-mode:
org.drools.spi.KnowledgeHelper.,$policyTerm()] [Near : {...
($interestRate/100),$policyTerm-$policYear+1) ) ) }] ^ [Line: 1, Column:
91]*


the source code  --   *1.  |   rule DeathBenefitRule
2.  |   dialect mvel
3.  |   when
4.  |   $deathBenefit : DeathBenefitFactModel( $sumAssured :
sumAssured, $interestRate : interestRate, $policYear : policYear,
$policyTerm : policyTerm)
5.  |   then
6.  |   $deathBenefit.setSumAssured( $sumAssured * ( 1 - (1 / 
(Math.pow
( (1 + ($interestRate/100),$policyTerm-$policYear+1) ) ) ) ) / (1 - (1 /
(Math.pow ( (1 + ($interestRate/100),$policyTerm) ) ) ) ) );
7.  |   update( $deathBenefit );
8.  |   end*

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4013590.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 put Power in Formula box of THEN ?

2012-05-24 Thread zeeshan
Thanks Mikey and Laune for replying

gonna try with 5.4.0 final version and free form DRL..I already broke
the formula into several small partswill let u know

thanks !!

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-put-Power-in-Formula-box-of-THEN-tp4013154p4014669.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't put formula on Guvnor screen

2012-05-23 Thread zeeshan
Hi Mike !!

I downloaded the *5.4 final version* and imported in Eclipse. I am still
facing the same problem as in 5.4 CR1 i.e. unable to put characters in
Formula of THEN section.I also tried with *5.5.0 SNAPSHOT*.same
problemactually I want to put this formula in THEN section   
 
 * deathBenefit=sumAssured * [(1 - 1/(1 +
(interestRate/100)^(policyTerm-policyYear+1) / 1 -  1/(1 +
(interestRate/100)^(policyTerm) ]* (quite complex )   Is this possible to
put this formula in Guvnor Formula box...??  I should go with the work
around using free form DRL in THEN section??

Thanks !



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-can-t-put-formula-on-Guvnor-screen-tp3987830p4008688.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
Hi !


I am unable to add more than one condition in a condition column like *age
= $1, age = $2* using Guvnor in Decision Table(Web guided Editor). How to
do this ???

Thanks !!!  Please refer to screen shots attached.
http://drools.46999.n3.nabble.com/file/n4006114/111.png 
http://drools.46999.n3.nabble.com/file/n4006114/222.png 

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
Hi Mike and thanks fro replying !

does it mean I need to add one more column(by clicking on the *+New
Column* and adding A simple Condition) with name Age with same
pattern??

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006273.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
Thanks Mike !!

I am using 5.4.0 CR1. Actually I am trying to learn different techniques of
Drools for creating rules. Currently I was trying with Excel files.
Standalone I created(without using using Guvnor, that Excel is in screen
shot). Then I tried decision table file creation using Guvnor(*confused
between Decision Table Spreadsheet and Decisoin Table Web Guided editor*).
Tried to google for the proper steps(dint understand anything). Then started
by self to explore choosing *Decision Table Web guided editor* without
checking *Use Wizard box*(also tried with checking but I dint understand
what things are there). Then fortunately created something that u can see in
the screen shot. In the meantime I tried to create a Test scenario for the
same. It was giving error *No RuleTable cells in spreadsheet.*. Please
tell me Where to give RuleTable cell in guvnor as I had given in excel file.
I am very  very much confused about what should I choose for this whether
DRL, Spreadsheet, Guided editor, using standalone excel file. It may be
possible that each one will be having some limitations. Please guide me
Mike. If u can provide me any right link or any blogs. would be highly
appreciable.



Thanks !!










manstis wrote
 
 We only support multiple parameters in a single column in Guvnor 5.4+.
 
 This would be created as a BRL Fragment and either use a single
 free-format DRL segment:-
 
 QuickQuoteInputProfile( age  @{min}, age = @{max} )
 
 or as a guided BRL (Guided Rule Editor) fragment.
 
 The screen shots showed an XLS decision table (that, incidentally, you
 should be able to import into Guvnor 5.4+ and get a web-guided one for
 free).
 
 On 22 May 2012 10:12, Wolfgang Laun lt;wolfgang.laun@gt; wrote:
 
 On the screenshot I saw another column where a range test was being
 coded with a pair of constraints, something like
   amount = $param1, amount  $param2
 which permits you to enter lower and upper bound, separated by a
 comma, in a single cell of that column.

 So if it isn't possible for age, it won't work for amount.

 -W

 On 22/05/2012, Michael Anstis lt;michael.anstis@gt; wrote:
  Yes, you'll need two columns:-
 
  QuickQuoteInputProfile.age 
  QuickQuoteInputProfile.age =
 
  If using 5.4 you can try the other options too, but try with this
 first.
 
  On 22 May 2012 09:58, zeeshan lt;zeeshan.spring@gt; wrote:
 
  Hi Mike and thanks fro replying !
 
  does it mean I need to add one more column(by clicking on the *+New
  Column* and adding A simple Condition) with name Age with same
  pattern??
 
  --
  View this message in context:
 
 http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006273.html
  Sent from the Drools: User forum mailing list archive at Nabble.com.
  ___
  rules-users mailing list
  rules-users@.jboss
  https://lists.jboss.org/mailman/listinfo/rules-users
 
 
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

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


--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006334.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
Yes I tried by adding row Add row button but it comes at the bottom but
I need need at the top ??  Do I really need at the top.???

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006350.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
Hi !

Please have a look at the screenshot. I think after clicking Add row it is
just appending a row to the decision table. Still the same error is
coming...but in the excel sheet that i had created , RuleTable and RuleSet
were on the top and share different area in the sheet.I dont know where
to add this in Decision table
http://drools.46999.n3.nabble.com/file/n4006387/11.png  

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006387.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
Thanks for the reply Mike !

I did the same...added a row and given the RuleTable. But when I open the
source code, it comes under State column
http://drools.46999.n3.nabble.com/file/n4006405/22.png 

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006405.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
Thanks for the reply Mike !

I did the same...added a row and given the RuleTable. But when I open the
source code, it comes under State column
http://drools.46999.n3.nabble.com/file/n4006406/22.png 

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006406.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
Ok Mike http://drools.46999.n3.nabble.com/file/n4006435/.png ...I created
a new Package TestXLSheet...in that package -- new rule -- given
name=DemoXLTest  , Type of rule= Decision Table(web guided-editor),
Options= Extended entry, values defined in table body After that a 
small Decision table appeared, I started by clicking +New Column--- Add a
simple condition, selected the pattern and all(before that I created a JAR 
for the Fact from eclipse which contained QuickQuoteInprofile.java and
others ).then created a New Test Scenario (refer to the screen shot for
this testing screen, may be I have done something silly).after clicking
Run Scenario, it gives  *Unable to run the scenario.
No RuleTable cells in spreadsheet*

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006435.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
So do I need to give any name for RuleTable ?? If yes, where..??


I also tried by selecting rule type Decision Table (spreadsheet) by
uploading one .xls file named QuickQuoteInputProfile.xls.  How to work on
this???  Moreover after uploading when I click on Convert to decision
table, it gives error--- *400 Sorry, a technical error occurred. Please
contact a system administrator.*

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006458.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
Hi Mike !

I have raised the issue along with my XLS file --- 
*https://issues.jboss.org/browse/GUVNOR-1901*



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006517.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
*Hi Mike!

I have created the decision table in Guvnor, this time without RuleTable
name.still the same error is showing  *
http://drools.46999.n3.nabble.com/file/n4006619/11.png 







http://drools.46999.n3.nabble.com/file/n4006619/22.png 

manstis wrote
 
 
 (1) No. You don't need to specify a RuleTable name. It is the name of the
 asset.
 
 (2) Uploading issue sounds like a bug. Please raise a JIRA,
 https://issues.jboss.org/browse/GUVNOR, and attach your XLS file.
 
 Thanks,
 
 Mike
 
 On 22 May 2012 12:33, zeeshan lt;zeeshan.spring@gt; wrote:
 
 So do I need to give any name for RuleTable ?? If yes, where..??


 I also tried by selecting rule type Decision Table (spreadsheet) by
 uploading one .xls file named QuickQuoteInputProfile.xls.  How to work on
 this???  Moreover after uploading when I click on Convert to
 decision
 table, it gives error--- *400 Sorry, a technical error occurred. Please
 contact a system administrator.*

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006458.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

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


--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4006619.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 add multiple conditions in condition column of decision table in Guvnor??

2012-05-22 Thread zeeshan
Hi Mike !!

Finally got the solutionthanks for ur responses.after so much of
scratching my head I found that while defining the Name of the rule, it
should be *RuleTable Eligibility Rules*(e.g. any name of the rule)  and *NOT
only Eligibility Rules*

Thanks Mike !!  

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-add-multiple-conditions-in-condition-column-of-decision-table-in-Guvnor-tp4006114p4007978.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't put formula on Guvnor screen

2012-05-16 Thread zeeshan
Hahahahahaha ;-)  and thanks Mike for the fix.so now I need to use
*5.5.0.beta1*..??
Currently I am using *guvnor-5.4.0.CR1-tomcat-6.0* WAR file then imported it
in Eclipse IDE, opened the browser and found the Guvnor Drools GUI and after
that followed JBOSS DROOLS BUSINESS RULES(old version I asked u earlier
about this and if u can provide me the latest version) file to create rules
and fact models. This is the process I followed. Am I following the right
way...??  Can u please give me the Link of the fixed release??   Also if
u can provide me the latest version of JBOSS DROOLS BUSINESS RULES


Thanks Mike !!  

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-can-t-put-formula-on-Guvnor-screen-tp3987830p3996729.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't put formula on Guvnor screen

2012-05-16 Thread zeeshan
Thanks very much Mike !!

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-can-t-put-formula-on-Guvnor-screen-tp3987830p3996773.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't put formula on Guvnor screen

2012-05-16 Thread zeeshan
Hi Mike !!

Actually I was asking from where I can purchase updated version of this
book. Can u provide any link from where I can buy online???  Or is there
any updated user guide for this from where I can learn Drools deeply...??

Thanks !! 



--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-can-t-put-formula-on-Guvnor-screen-tp3987830p3996804.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't put formula on Guvnor screen

2012-05-16 Thread zeeshan
Hi Mike !!

I have downloaded almost all the files and now going through one by
onewill let u know if get stuck in problem...

Thanks !

--
View this message in context: 
http://drools.46999.n3.nabble.com/rules-users-can-t-put-formula-on-Guvnor-screen-tp3987830p3996861.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] getting JAR problems

2012-05-16 Thread zeeshan
Hi !

I imported chapter 6 source code(Jboss Drools Business rules) in Eclipse as
a Maven projectI am getting JAR errorsI am using 5.4
versionPlease help me to put right JARS...please refer to the screen
shots...
thanks !!! http://drools.46999.n3.nabble.com/file/n3998504/12.png 

--
View this message in context: 
http://drools.46999.n3.nabble.com/getting-JAR-problems-tp3998504.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] can't put formula on Guvnor screen

2012-05-15 Thread zeeshan khan
Hi Team !

   Earlier I sent this mail to rules-...@lists.jboss.org. Mark
Proctor asked me to mail here so I am mailing here in the hope of reply.

   Since yesterday only I started learning Drools with the help of
Google and *JBOSS DROOLS BUSINESS RULES pdf file*. I faced many problems to
understand the concept but now its going smooth. But the problem is
the *version
of PDF file of the book* and the *Govener version*. *Its quite different*.
 I request you all to please provide me the latest version of PDF as I am
unable to find on net. The problem I am facing is to put the formula as
given in the screen shot in the book.
   I am unable to put the *formula* as described in JBOSS DROOLS
BUSINESS RULES pdf file on page no. 102.the formula is *salesValue-10
as the box is not capable of taking cahracters. *It is taking only integer.

Thanks in Advance for all the help and material 
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] can't put formula on Guvnor screen

2012-05-15 Thread zeeshan khan
*Hi Mike !!*
*
*
*Thanks for the reply.its working fine in WHEN but not in THEN..*











On Tue, May 15, 2012 at 5:06 PM, Michael Anstis michael.ans...@gmail.comwrote:

 The book, as Mark also said, is out of date compared to the current (5.4)
 version of Drools and Guvnor.

 I suspect you've elected to set the field's value to a literal rather than
 formula. Please try deleting the constraint and adding back.

 When clicking on the pencil icon next to the operator be sure to select
 New formula.

 With kind regards,

 Mike

 On 15 May 2012 12:27, zeeshan khan zeeshan.spr...@gmail.com wrote:

 Hi Team !

Earlier I sent this mail to rules-...@lists.jboss.org. Mark
 Proctor asked me to mail here so I am mailing here in the hope of reply.

Since yesterday only I started learning Drools with the help
 of Google and *JBOSS DROOLS BUSINESS RULES pdf file*. I faced many
 problems to understand the concept but now its going smooth. But the
 problem is the *version of PDF file of the book* and the *Govener version
 *. *Its quite different*.  I request you all to please provide me the
 latest version of PDF as I am unable to find on net. The problem I am
 facing is to put the formula as given in the screen shot in the book.
I am unable to put the *formula* as described in JBOSS DROOLS
 BUSINESS RULES pdf file on page no. 102.the formula is *salesValue-10
 as the box is not capable of taking cahracters. *It is taking only
 integer.

 Thanks in Advance for all the help and material 


 ___
 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




-- 


Best Regards,

*Zeeshan Khan*
*Liferay Java Developer*
*IBEXI Solutions India*
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] can't put formula on Guvnor screen

2012-05-15 Thread zeeshan khan
*Hi Mike !!*
*
*
*I am using 5.4 versionplease have a look to the  screen shots
attached.*

the rounded box in the screenshot takes only numbers in the case of
THENbut working fine in WHEN...
so i tried by using *ADD FROM FREE DRL*(in the box 2), and this was working
fine...

thanks !!








On Tue, May 15, 2012 at 6:06 PM, Michael Anstis michael.ans...@gmail.comwrote:

 I tested formula with 5.4 and it works as I defined.

 What version of Guvnor are you using?


 On 15 May 2012 13:34, zeeshan khan zeeshan.spr...@gmail.com wrote:

 *Hi Mike !!*
 *
 *
 *Thanks for the reply.its working fine in WHEN but not in THEN..*











 On Tue, May 15, 2012 at 5:06 PM, Michael Anstis michael.ans...@gmail.com
  wrote:

 The book, as Mark also said, is out of date compared to the current
 (5.4) version of Drools and Guvnor.

 I suspect you've elected to set the field's value to a literal rather
 than formula. Please try deleting the constraint and adding back.

 When clicking on the pencil icon next to the operator be sure to select
 New formula.

 With kind regards,

 Mike

 On 15 May 2012 12:27, zeeshan khan zeeshan.spr...@gmail.com wrote:

 Hi Team !

Earlier I sent this mail to rules-...@lists.jboss.org. Mark
 Proctor asked me to mail here so I am mailing here in the hope of reply.

Since yesterday only I started learning Drools with the help
 of Google and *JBOSS DROOLS BUSINESS RULES pdf file*. I faced many
 problems to understand the concept but now its going smooth. But the
 problem is the *version of PDF file of the book* and the *Govener
 version*. *Its quite different*.  I request you all to please provide
 me the latest version of PDF as I am unable to find on net. The problem I
 am facing is to put the formula as given in the screen shot in the book.
I am unable to put the *formula* as described in JBOSS
 DROOLS BUSINESS RULES pdf file on page no. 102.the formula is 
 *salesValue-10
 as the box is not capable of taking cahracters. *It is taking only
 integer.

 Thanks in Advance for all the help and material 


 ___
 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




 --


 Best Regards,

 *Zeeshan Khan*
 *Liferay Java Developer*
 *IBEXI Solutions India*


 ___
 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




-- 


Best Regards,

*Zeeshan Khan*
*Liferay Java Developer*
*IBEXI Solutions India*
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] can't put formula on Guvnor screen

2012-05-15 Thread zeeshan khan
*wo Mike.I can't believe it.its been only two days I
have started digging around Drools and found a bugIt would be great if
I can help this community in any ways... by the way MikeI am
desperately waiting for my prize  ;-)*








On Tue, May 15, 2012 at 6:38 PM, Michael Anstis michael.ans...@gmail.comwrote:

 Congratulations :)

 You win the prize for finding (possibly) the first bug in 5.4. Using
 free-format DRL is, as you've found, a work-around.

 Can you please raise a bug at https://issues.jboss.org/browse/GUVNOR and
 I'll fix as soon as possible.

 With kind regards,

 Mike


 On 15 May 2012 13:51, zeeshan khan zeeshan.spr...@gmail.com wrote:


 *sorry forgot to attach the fileplease find it again...*







 On Tue, May 15, 2012 at 6:19 PM, zeeshan khan 
 zeeshan.spr...@gmail.comwrote:

 *Hi Mike !!*
 *
 *
 *I am using 5.4 versionplease have a look to the  screen shots
 attached.*

 the rounded box in the screenshot takes only numbers in the case of
 THENbut working fine in WHEN...
 so i tried by using *ADD FROM FREE DRL*(in the box 2), and this was
 working fine...

 thanks !!








 On Tue, May 15, 2012 at 6:06 PM, Michael Anstis 
 michael.ans...@gmail.com wrote:

 I tested formula with 5.4 and it works as I defined.

 What version of Guvnor are you using?


 On 15 May 2012 13:34, zeeshan khan zeeshan.spr...@gmail.com wrote:

 *Hi Mike !!*
 *
 *
 *Thanks for the reply.its working fine in WHEN but not in
 THEN..*











 On Tue, May 15, 2012 at 5:06 PM, Michael Anstis 
 michael.ans...@gmail.com wrote:

 The book, as Mark also said, is out of date compared to the current
 (5.4) version of Drools and Guvnor.

 I suspect you've elected to set the field's value to a literal rather
 than formula. Please try deleting the constraint and adding back.

 When clicking on the pencil icon next to the operator be sure to
 select New formula.

 With kind regards,

 Mike

 On 15 May 2012 12:27, zeeshan khan zeeshan.spr...@gmail.com wrote:

 Hi Team !

Earlier I sent this mail to rules-...@lists.jboss.org.
 Mark Proctor asked me to mail here so I am mailing here in the hope of
 reply.

Since yesterday only I started learning Drools with the
 help of Google and *JBOSS DROOLS BUSINESS RULES pdf file*. I faced
 many problems to understand the concept but now its going smooth. But 
 the
 problem is the *version of PDF file of the book* and the *Govener
 version*. *Its quite different*.  I request you all to please
 provide me the latest version of PDF as I am unable to find on net. The
 problem I am facing is to put the formula as given in the screen shot in
 the book.
I am unable to put the *formula* as described in JBOSS
 DROOLS BUSINESS RULES pdf file on page no. 102.the formula is 
 *salesValue-10
 as the box is not capable of taking cahracters. *It is taking only
 integer.

 Thanks in Advance for all the help and material 


 ___
 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




 --


 Best Regards,

 *Zeeshan Khan*
 *Liferay Java Developer*
 *IBEXI Solutions India*


 ___
 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




 --


 Best Regards,

 *Zeeshan Khan*
 *Liferay Java Developer*
 *IBEXI Solutions India*




 --


 Best Regards,

 *Zeeshan Khan*
 *Liferay Java Developer*
 *IBEXI Solutions India*


 ___
 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




-- 


Best Regards,

*Zeeshan Khan*
*Liferay Java Developer*
*IBEXI Solutions India*
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] can't put formula on Guvnor screen

2012-05-15 Thread zeeshan khan
*wo Mike.I can't believe it.its been only two days I
have started digging around Drools and found a bugIt would be great if
I can help this community in any ways... by the way MikeI am
desperately waiting for my prize  ;-)*








*On Tue, May 15, 2012 at 6:38 PM, Michael Anstis
michael.ans...@gmail.comwrote:
*

 *Congratulations :)

 You win the prize for finding (possibly) the first bug in 5.4. Using
 free-format DRL is, as you've found, a work-around.

 Can you please raise a bug at https://issues.jboss.org/browse/GUVNOR and
 I'll fix as soon as possible.

 With kind regards,

 Mike*


 On 15 May 2012 13:51, zeeshan khan zeeshan.spr...@gmail.com wrote:


 *sorry forgot to attach the fileplease find it again...*







 On Tue, May 15, 2012 at 6:19 PM, zeeshan khan 
 zeeshan.spr...@gmail.comwrote:

 *Hi Mike !!*
 *
 *
 *I am using 5.4 versionplease have a look to the  screen shots
 attached.*

 the rounded box in the screenshot takes only numbers in the case of
 THENbut working fine in WHEN...
 so i tried by using *ADD FROM FREE DRL*(in the box 2), and this was
 working fine...

 thanks !!








 On Tue, May 15, 2012 at 6:06 PM, Michael Anstis 
 michael.ans...@gmail.com wrote:

 I tested formula with 5.4 and it works as I defined.

 What version of Guvnor are you using?


 On 15 May 2012 13:34, zeeshan khan zeeshan.spr...@gmail.com wrote:

 *Hi Mike !!*
 *
 *
 *Thanks for the reply.its working fine in WHEN but not in
 THEN..*











 On Tue, May 15, 2012 at 5:06 PM, Michael Anstis 
 michael.ans...@gmail.com wrote:

 The book, as Mark also said, is out of date compared to the current
 (5.4) version of Drools and Guvnor.

 I suspect you've elected to set the field's value to a literal rather
 than formula. Please try deleting the constraint and adding back.

 When clicking on the pencil icon next to the operator be sure to
 select New formula.

 With kind regards,

 Mike

 On 15 May 2012 12:27, zeeshan khan zeeshan.spr...@gmail.com wrote:

 Hi Team !

Earlier I sent this mail to rules-...@lists.jboss.org.
 Mark Proctor asked me to mail here so I am mailing here in the hope of
 reply.

Since yesterday only I started learning Drools with the
 help of Google and *JBOSS DROOLS BUSINESS RULES pdf file*. I faced
 many problems to understand the concept but now its going smooth. But 
 the
 problem is the *version of PDF file of the book* and the *Govener
 version*. *Its quite different*.  I request you all to please
 provide me the latest version of PDF as I am unable to find on net. The
 problem I am facing is to put the formula as given in the screen shot in
 the book.
I am unable to put the *formula* as described in JBOSS
 DROOLS BUSINESS RULES pdf file on page no. 102.the formula is 
 *salesValue-10
 as the box is not capable of taking cahracters. *It is taking only
 integer.

 Thanks in Advance for all the help and material 


 ___
 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




 --


 Best Regards,

 *Zeeshan Khan*
 *Liferay Java Developer*
 *IBEXI Solutions India*


 ___
 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 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




-- 


Best Regards,

*Zeeshan Khan*
*Liferay Java Developer*
*IBEXI Solutions India*
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users