AnsweredAssumed Answered

Error on BusinessRuleTask

Question asked by bbrod69 on Jun 11, 2013
Latest reply on Jun 12, 2013 by trademak
Hi,

I try an example with BusinessRuleTask and I have an error :


13666 [main] INFO org.activiti.engine.impl.ProcessEngineImpl - ProcessEngine default created
13940 [main] INFO org.springframework.test.context.transaction.TransactionalTestExecutionListener - Began transaction (1): transaction manager [org.springframework.orm.jpa.JpaTransactionManager@189cab]; rollback [false]
14216 [main] INFO org.activiti.engine.impl.bpmn.deployer.BpmnDeployer - Processing resource diagrams/rulesdemo.bpmn
14985 [main] INFO org.activiti.engine.impl.bpmn.deployer.BpmnDeployer - Processing resource rules.drl
Setting ruleInput RuleInput [salary=1000, age=25, employee=theEmploye]
15286 [main] INFO org.activiti.engine.impl.bpmn.deployer.BpmnDeployer - Processing resource diagrams/rulesdemo.bpmn
15348 [main] INFO org.activiti.engine.impl.bpmn.deployer.BpmnDeployer - Processing resource rules.drl
15348 [main] INFO org.activiti.engine.impl.bpmn.deployer.BpmnDeployer - Processing resource diagrams/rulesdemo.rulesdemo.png
15354 [main] ERROR org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context
org.activiti.engine.ActivitiException: deployment 1 doesn't contain any rules
   at org.activiti.engine.impl.rules.RulesHelper.findKnowledgeBaseByDeploymentId(RulesHelper.java:51)
at org.activiti.engine.impl.bpmn.behavior.BusinessRuleTaskActivityBehavior.execute(BusinessRuleTaskActivityBehavior.java:48)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:86)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:530)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:525)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:86)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:530)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:525)
   at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:86)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:530)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:525)


- I have a rules.drl file in the classpath who is process as you can see in trace above.

- I have a test class with

Deployment deployment = repositoryService.createDeployment()
             .addClasspathResource("diagrams/rulesdemo.bpmn").addClasspathResource("rules.drl").deploy();

- the process seem to be deployed.

The error occurs when I start a process Instance with :

ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("rulesdemo");   


What's the problem?

Outcomes