--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/d56b8c16-eb11-4952-9e76-68fe6b7fd2d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
package com.myteam.qofandvaccinationrules;
//generated from Decision Table
import com.myteam.qofandvaccinationrules.SeasonalFluApplicant;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import java.lang.Boolean;
function int isSuccess(boolean bool) { return bool? 1 : 0; }
function Date calculateDateBasedonMonths(Date fromDate, Integer months){
Calendar cal = Calendar.getInstance();
cal.setTime(fromDate);
cal.add(Calendar.MONTH, months);
Date modifiedDate = cal.getTime();
return modifiedDate;
}
// rule values at G13, header at G8
rule "SFLUCC001-1-1-1"
ruleflow-group "SFLUCC001-COHORT"
agenda-group "SFLUCC001-COHORT"
when
$req:SeasonalFluApplicant(getPAT2_AGE() >= 65)
then
System.out.println("1");
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLU001-GROUP").setFocus();
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLUMI002-GROUP").setFocus();
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLUMI004-GROUP").setFocus();
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLUMI006-GROUP").setFocus();
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLUMI008-GROUP").setFocus();
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLUMI010-GROUP").setFocus();
end
// rule values at G17, header at G8
rule "SFLUCC002-3-2-1"
ruleflow-group "SFLUCC002-COHORT"
agenda-group "SFLUCC002-COHORT"
when
$req:SeasonalFluApplicant(getAST_DAT() != null, getASTRES_DAT() == null, getASTTRTATRISK1_DAT() > calculateDateBasedonMonths(getFIRSTVAC_DAT(), -12.00))
then
System.out.println("1");
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLU006-GROUP").setFocus();
end
package com.myteam.qofandvaccinationrules;
import com.myteam.qofandvaccinationrules.SeasonalFluApplicant;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import java.lang.Boolean;
//from row number: 1
//GMS registration status
rule "Row 1 Seasonal Flu"
ruleflow-group "SFLUCC001-COHORT"
agenda-group "SFLUCC001-COHORT"
dialect "mvel"
when
$req : SeasonalFluApplicant( getPAT2_AGE() >= "65")
then
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLU001-GROUP").setFocus();
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLUMI002-GROUP").setFocus();
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLUMI004-GROUP").setFocus();
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLUMI006-GROUP").setFocus();
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLUMI008-GROUP").setFocus();
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLUMI010-GROUP").setFocus();
end
//from row number: 7
//GMS registration status
rule "Row 7 Seasonal Flu"
ruleflow-group "SFLUCC002-COHORT"
agenda-group "SFLUCC002-COHORT"
dialect "mvel"
when
$req : SeasonalFluApplicant( getAST_DAT() != "null" , getASTRES_DAT() == "null" , getASTTRTATRISK1_DAT() > "-12") )
then
kcontext.getKnowledgeRuntime().getAgenda().getAgendaGroup("SFLU006-GROUP").setFocus();
end
Unable to Analyse Expression getASTTRTATRISK1_DAT() > "-12": [Error: Comparison operation requires compatible types. Found class java.util.Date and class java.lang.String] Request you to revert at earliest as it is blocking work from past 3 days |
What are the errors?Do you have the JAR containing the required classes added as a dependency to your project?
On 10 January 2018 at 12:23, Gaurav Mehta <gaurav...@gmail.com> wrote:
I have converted a big spreadsheet into xls decision table in KIE workbench and validated. But, on converting guided decision table, it is giving many errors e..g functions defined in decision table are not appearing and integer & nulls are showing as String.I have to use the guided decision table in business process.Either I need suggestions to solve guided decision table errorsorconvert decision table into DRL file so that I can use rules from DRL file in business tasks.Kindly suggest best approach.
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/92155e76-efd1-4818-bf6d-000d37ec7ac7%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/14ecb5a6-6bbb-405c-9fbd-8b41f5565c14%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/1bb63b97-203c-42a3-a5ef-4224182bbd91%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/7a3b22e2-322c-4f4f-94d7-c8cddfdc142f%40googlegroups.com.
Facing 2 issues:
1) Functions that we are calling in CONDITION in xls, they are appearing fine in Decision Table.
On conversion to Guided Decision Table, 2 files are created
Function DRL file
Guided Decision Table
But in Guided Decision table, in the conditions, function is not coming up due to which we are getting compile type errors.
E.g. calculateDateBasedonMonths function given below not coming up
For Example
Code in Decision Table : $req:SeasonalFluApplicant(getASTTRTATRISK1_DAT() > calculateDateBasedonMonths(getFIRSTVAC_DAT(), -12))
Code in Guided Decision Table : $req : SeasonalFluApplicant( getASTTRTATRISK1_DAT() > "-12" )
2) Integer are showing in double quotes in guided decision table
$req : SeasonalFluApplicant( getPAT2_AGE() >= "65" )
Though in DRL it is showing as
$req : SeasonalFluApplicant( getPAT2_AGE() >= 6" )
Kindly help.
Request you to revert on our issues. I have attached zip file in yesterday post
Hi
Request you to revert on our issues. I have attached zip file in yesterday post
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/9774bae0-9b5b-4876-8031-698a173a79a4%40googlegroups.com.