cancel
Showing results for 
Search instead for 
Did you mean: 

Business Rule Task is not fired

khaled012
Champ in-the-making
Champ in-the-making
Hello All,

I'm testing a process that contains a business rule task.
My steps was:
1. I updated activiti.cfg.xml
   <property name="customPostDeployers">
      <list>
        <bean class="org.activiti.engine.impl.rules.RulesDeployer" />
      </list>
    </property>

2. I added the drools jars to activiti-rest lib folder (drools-api , drools-compiler , drools-core , mvel2)

3. I packaged my java beans and delegates then I copied it to activiti-rest lib folder

4. I packaged my bpmn , forms , drl files into one bar then I uploaded it using activiti-probe

and I have 2 problems :
1. The rule is not fired.
2. The Business Rule task doesn't appear in the process diagram.

does any one here faced these problems ?
7 REPLIES 7

trademak
Star Contributor
Star Contributor
Hi,

Please post the BPMN 2.0 XML file.
Did you create the XML with the Activiti Designer or by hand?

Best regards,

khaled012
Champ in-the-making
Champ in-the-making
Hi trademak,

I'm using the BPMN 2.0 xml file from the project you attached in this topic http://forums.activiti.org/en/viewtopic.php?f=6&t=1266

here is the xml file

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="rulesdemo" name="rulesdemo">
    <startEvent id="startevent1" name="Start" activiti:formKey="ruleInput.form"></startEvent>
    <serviceTask id="servicetask3" name="Service Task" activiti:class="org.activiti.demo.rules.CreateRuleObjectDelegate"></serviceTask>
    <businessRuleTask id="businessruletask1" name="Business rule task" activiti:rules="salarycheck" activiti:ruleVariablesInput="${ruleInput}" activiti:exclude="false" activiti:resultVariableName="ruleOutput"></businessRuleTask>
    <serviceTask id="servicetask4" name="Service Task" activiti:class="org.activiti.demo.rules.OutputObjectDelegate"></serviceTask>
    <userTask id="usertask1" name="Result" activiti:assignee="kermit" activiti:formKey="ruleOutput.form"></userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow22" name="" sourceRef="businessruletask1" targetRef="servicetask4"></sequenceFlow>
    <sequenceFlow id="flow23" name="" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
    <sequenceFlow id="flow24" name="" sourceRef="startevent1" targetRef="servicetask3"></sequenceFlow>
    <sequenceFlow id="flow25" name="" sourceRef="servicetask3" targetRef="businessruletask1"></sequenceFlow>
    <sequenceFlow id="flow26" name="" sourceRef="servicetask4" targetRef="usertask1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_rulesdemo">
    <bpmndi:BPMNPlane bpmnElement="rulesdemo" id="BPMNPlane_rulesdemo">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="55" width="55" x="30" y="200"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="servicetask3" id="BPMNShape_servicetask3">
        <omgdc:Bounds height="55" width="105" x="145" y="200"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="businessruletask1" id="BPMNShape_businessruletask1">
        <omgdc:Bounds height="55" width="105" x="310" y="200"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="servicetask4" id="BPMNShape_servicetask4">
        <omgdc:Bounds height="55" width="105" x="475" y="200"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
        <omgdc:Bounds height="55" width="105" x="640" y="200"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="55" width="55" x="805" y="200"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow22" id="BPMNEdge_flow22">
        <omgdi:waypoint x="415" y="227"></omgdi:waypoint>
        <omgdi:waypoint x="475" y="227"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow23" id="BPMNEdge_flow23">
        <omgdi:waypoint x="745" y="227"></omgdi:waypoint>
        <omgdi:waypoint x="805" y="227"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow24" id="BPMNEdge_flow24">
        <omgdi:waypoint x="85" y="227"></omgdi:waypoint>
        <omgdi:waypoint x="145" y="227"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow25" id="BPMNEdge_flow25">
        <omgdi:waypoint x="250" y="227"></omgdi:waypoint>
        <omgdi:waypoint x="310" y="227"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow26" id="BPMNEdge_flow26">
        <omgdi:waypoint x="580" y="227"></omgdi:waypoint>
        <omgdi:waypoint x="640" y="227"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

Best Regards,

khaled012
Champ in-the-making
Champ in-the-making
Hi ,

is this problem should be reported as a bug in the Activiti Engine?

Best Regards,

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
not yet. I think you should wait for feedback from Tijs (trademak)

trademak
Star Contributor
Star Contributor
Hi,

You say that you packaged the JAR files and the BAR file.
Could you please post them to this thread?
If you have a source project to share that would also be good to have.

Thanks,

khaled012
Champ in-the-making
Champ in-the-making
Hi ,

Thanks for your reply.
I attached the eclipse project and the deployment artifacts.

Best Regards,

khaled012
Champ in-the-making
Champ in-the-making
Hi ,

I just tested this process on Activiti 5.5 and it worked well (but the business rule task doesn't appear in the process diagram).

can it be configured to run on Activiti 5.6 ?

Best Regards,