This content has been marked as final.
Show 4 replies
-
1. Re: Couple of new features in seam-drools integration
gilson.tavares Aug 27, 2009 3:28 PM (in response to tsurdilovic)I believe this link to thread in the rule-dev mail list gives further information about Seam / Drools integration and offers a way to send comments and suggestions on this subject (JBSEAM-4260):
http://lists.jboss.org/pipermail/rules-dev/2009-August/001414.html
-
2. Re: Couple of new features in seam-drools integration
mas_dayana Nov 9, 2009 12:42 AM (in response to tsurdilovic)Hi, could you please help me,
i try to inject the working memory in the Seam component
@In
WorkingMemory decisionWM
but when i run the server, i got error.
Please help me. thank you
-
3. Re: Couple of new features in seam-drools integration
tsurdilovic Nov 9, 2009 3:50 PM (in response to tsurdilovic)Hello Mas,
What is the Seam version used? Post your entire error and your components.xml so we can try to help.
Thanks.
-
4. Re: Couple of new features in seam-drools integration
mas_dayana Nov 11, 2009 4:38 PM (in response to tsurdilovic)Hi Tihomir,
Sorry for my late reply. Ok, this is my scenario. I am using seam 2.1.2. I create a process in my project, in the first node, the process will call some data from the dB, pass the data to the second node. In the second node, i want to evaluate the data using Drools. This is a part of my processDefinition.xml;
....
<node name="Collect Data">
<event type="node-enter">
<action expression="#{notifyPatient.notification}"/>
</event>
<transition to="Evaluate Data"></transition>
</node>
<node name="Evaluate Data">
<event type="node-enter">
<action expression="#{evaluateData.evaluatStatus}"/>
</event>
<transition to="Send Email"></transition>
</node>
.....
I'm having trouble in the EvaluateData, in this seam component, i want to inject the workingMemory like the code below;
@Name("evaluateData")
public class EvaluateData {
@In WorkingMemory evaluationRulesWorkingMemory;
@In Status status;
@In Result result;
public void evaluateStatus() throws FactException
{
policyPricingWorkingMemory.insert(status);
policyPricingWorkingMemory.fireAllRules();
}
....
The error is at the @In WorkingMemory..where it will create a null value, and will create error in the JBPM context. The error will also occur if i define the workingmemory directly in processDefinition. I do not have problem injecting the data that i pass from the previous node. And the output from the .drl file is a just strings.
This is my Drools part in the component.xml;
...
<component name="evaluationRule"
class="org.jboss.seam.drools.RuleBase">
<property name="ruleFiles">evaluation.drl</property>
</component>
<component name="evaluationRulesWorkingMemory"
class="org.jboss.seam.drools.ManagedWorkingMemory" auto-create="true">
<property name="ruleBase">"#{evaluationRules}"</property>
</component>
.........
Another question is, where should i put my .drl file? Currently, i put it in the EAR folder.
Thank you for your time.