AnsweredAssumed Answered

When spring loaded automatically bpmn, drools how to load?

Question asked by feihuli on Nov 27, 2013
Latest reply on Nov 29, 2013 by trademak
hi, Hello everybody , in activiti , there is a Business rule task components , you can call drools rules file . drl
But the official said the document is very simple, there are a lot of places do not understand , can only get groped , we encounter a problem, simply can not find the solution online , and ask you, if met , there is no good way .
I'm using spring automated deployment , to load bpmn file, in the configuration Business rule task component, there is no place to specify which rules file . Drl, always lead to the implementation of this component at the time , and reported no binding rule error , I found abroad activiti forum is not spring loaded configuration files and drl file approach does not explain how the deployment spring automatically processed , there are solutions to it?
Manual loading as follows :
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine (); RepositoryService repositoryService = processEngine.getRepositoryService ();
RuntimeService runtimeService = processEngine.getRuntimeService ();
repositoryService.createDeployment ()
  . addClasspathResource ("rulesdemo.bpmn20.xml")
  . addClasspathResource ("rules.drl")
  . deploy ();
runtimeService.startProcessInstanceByKey ("rulesdemo");

Outcomes