cancel
Showing results for 
Search instead for 
Did you mean: 

When spring loaded automatically bpmn, drools how to load?

feihuli
Champ in-the-making
Champ in-the-making
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");
4 REPLIES 4

trademak
Star Contributor
Star Contributor
Your question is very hard to understand due to the strange English sentences. But did you also configure the process engine configuration with the RulesDeployer like shown here?

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

feihuli
Champ in-the-making
Champ in-the-making
Sorry, google translate these English words are generated, there may be not fluent, I was in China, my English is not very good, I was in-depth study activiti, this question makes me a little confused, so come here to ask, it seems language I did not express nerve disorders, can send me some documentation about Business rule task components, little detail

feihuli
Champ in-the-making
Champ in-the-making
Almost forgot, my mailbox is hp50@163.com, thank you very much

trademak
Star Contributor
Star Contributor
If the user guide doesn't provide enough details, please look at the Activiti in Action book, which contains a detailed business rule task example.

Best regards,