Ram Biradar [
http://community.jboss.org/people/ram.biradar] created the discussion
"How to integrate .drl file in JBPM 5 using Rule Task"
To view the discussion, visit:
http://community.jboss.org/message/636912#636912
--------------------------------------------------------------
Hi,
I am new to JBPM. Now i am working on Rule Task in jbpm 5 and i want to
integrate .drl file in jbpm 5. Here im using process variable's name and percentage
and i have written one .drl file based on the percentage i want to set the percentage what
i have written in .drl.
This is my work flow:
message/636780#636780 message/636780#636780
In student task i will get one form here i will enter name and percentage and its hits
simpleDrools Rule task and after that its not moving. I will sending my code what i have
written in script task before the Rule task i,e input and one script task i,e output
script1 code:-
map=new java.util.HashMap();
map.put("percentage",percentage);
kcontext.setVariable("percentage",percentage);
kcontext.getKnowledgeRuntime().insert(hpm.getPercentage());
script2 code:-
map.put("name",name);
map.put("percentage",percentage);
simpleDrools.drl:--
package com.sample
import com.sample.hello.HelloProcessModel
rule "NYuser_Rule"
no-loop true
ruleflow-group "EvalLoopcondition"
when
m:HelloProcessModel(percentage>75)
then
m.setPercentage(90);update(m);
end
rule "ChileUser_Rule"
no-loop true
ruleflow-group "EvalLoopcondition"
when
m:HelloProcessModel(percentage < 75)
then
m.setPercentage(60);update(m);
end
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/636912#636912]
Start a new discussion in jBPM Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]