AnsweredAssumed Answered

The integration of drool + activiti issue

Question asked by niktyagi88 on Apr 20, 2012
Latest reply on Oct 30, 2012 by garvitj1
I am running the business rule task by the activiti API.The process is running by the test case.The class is as follow :

private String filename = "C:/Users/niktyagi88/Documents/workspace-sts-2.7.1.RELEASE/ActivitiDemo/src/main/resources/diagrams/MyProcess.bpmn";

private String rulename = "C:/Users/niktyagi88/Documents/workspace-sts-2.7.1.RELEASE/ActivitiDemo/src/main/resources/diagrams/Sample.drl";

@Test
public void startProcess() throws Exception {

RepositoryService repositoryService = activitiRule.getRepositoryService();   

repositoryService.createDeployment().addInputStream("process1.bpmn20.xml",new FileInputStream(filename)).addInputStream("Sample.drl",new FileInputStream( rulename)).deploy();

RuntimeService runtimeService = activitiRule.getRuntimeService();
      
ProcessInstance processInstance=runtimeService.startProcessInstanceByKey("process1");
}


And the bpmn.20.xml file for business rule task is as follow:

<businessRuleTask id="businessruletask1" name="Business rule task" activiti:rules="demo" activiti:exclude="false"></businessRuleTask>

The drool rule is :

rule "demo"
when
then
System.out.println("HELLO");
end


The exception is :
org.activiti.engine.ActivitiException: deployment 1 doesn't contain any rules.


Please help me to solve the issue.

Outcomes