[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1442) Cannot create template Fact in RHS
greywind (JIRA)
jira-events at lists.jboss.org
Wed Jan 30 11:08:59 EST 2008
[ http://jira.jboss.com/jira/browse/JBRULES-1442?page=comments#action_12397507 ]
greywind commented on JBRULES-1442:
-----------------------------------
The following works but it is hardly what is wanted:
Fact fact = drools.getWorkingMemory().getRuleBase().getPackage("org.drools.entity").
getFactTemplate("DuplicateIdentifier").createFact(1);
fact.setFieldValue(0,id);
insert(fact);
BTW, I cannot do an insertLogical as a retract of FactTemplates leads to a NPE. I'll open a separate issue for that
> Cannot create template Fact in RHS
> ----------------------------------
>
> Key: JBRULES-1442
> URL: http://jira.jboss.com/jira/browse/JBRULES-1442
> Project: JBoss Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Drl Parser/Builder
> Affects Versions: 4.0.4
> Reporter: greywind
>
> The following drl should work if i'm not mistaken
> template DuplicateIdentifier
> Identifier identifier;
> end
> rule ""
> when
> then
> insert (new DuplicateIdentifier());
> end
> but it leads to
> Error: Rule Compilation error DuplicateIdentifier cannot be resolved to a type
> Exception in thread "main" org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule name=, agendaGroup=MAIN, salience=0, no-loop=false]
> org/drools/entity/Rule__0.java (8:294) : DuplicateIdentifier cannot be resolved to a type
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list