cancel
Showing results for 
Search instead for 
Did you mean: 

Error on BusinessRuleTask

bbrod69
Champ in-the-making
Champ in-the-making
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?

2 REPLIES 2

bbrod69
Champ in-the-making
Champ in-the-making
no reply?

trademak
Star Contributor
Star Contributor
Ehm, so you expect a reply in only a couple of minutes?
Did you add the following lines to the process engine configuration?

<blockcode>
<property name="customPostDeployers">
   <list>
      <bean class="org.activiti.engine.impl.rules.RulesDeployer" />
   </list>
</property>
</blockcode>
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.