<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Deploying a drools rule file using the API in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/deploying-a-drools-rule-file-using-the-api/m-p/204135#M157265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to figure out Activiti and I'm stuck on trying to get a Business Rule Task working.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My .drl file contains:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;//created on: 2014-08-29&lt;BR /&gt;package rules&lt;BR /&gt;&lt;BR /&gt;rule "rule1"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; when&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eval(true)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("+++&amp;nbsp;&amp;nbsp;&amp;nbsp;rule1");&lt;BR /&gt;end&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I deploy it in Java as such:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-java line-numbers"&gt;&lt;CODE&gt;repositoryService.createDeployment().addInputStream(rule, new FileInputStream(pathToRule)).addInputStream(processName, new FileInputStream(pathToProcess)).deploy();&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the eclipse designer my business rule task properties are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;businessRuleTask id="businessruletask1" name="Business rule task" activiti:rules="rule1"&amp;gt;&amp;lt;/businessRuleTask&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error I'm getting is: deployment 1 doesn't contain any rules.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The deployment seems to go ok:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2014-08-29 17:19:47 org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INFO: Processing resource business1.drl&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2014-08-29 17:19:47 org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INFO: Processing resource proces_3.bpmn20.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where could the problem be? I have read previously that I have to deploy a .BAR file with the .drl file inside, but that seems to be the case for Activiti Explorer. The rule is pretty straightforward, and the deployment seems to be processed successfully. Is there a problem with my Business Task properties? I have read the documentation but tbh it's not very clear on many things, it does say that "we need to define the input and result variables" but if I'm correct those are the variables used in the rule and the resulting process variable so it should not apply to my simple rule.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for the help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Aug 2014 15:35:34 GMT</pubDate>
    <dc:creator>surreal1991</dc:creator>
    <dc:date>2014-08-29T15:35:34Z</dc:date>
    <item>
      <title>Deploying a drools rule file using the API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/deploying-a-drools-rule-file-using-the-api/m-p/204135#M157265</link>
      <description>Hi,I'm trying to figure out Activiti and I'm stuck on trying to get a Business Rule Task working.My .drl file contains://created on: 2014-08-29package rulesrule "rule1"&amp;nbsp;&amp;nbsp;&amp;nbsp; when&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eval(true)&amp;nbsp;&amp;nbsp;&amp;nbsp; then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("+++&amp;nbsp;&amp;nbsp;&amp;nbsp;rule1");end‍‍‍‍‍‍‍‍‍And I deploy it in Java as such:repositorySe</description>
      <pubDate>Fri, 29 Aug 2014 15:35:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/deploying-a-drools-rule-file-using-the-api/m-p/204135#M157265</guid>
      <dc:creator>surreal1991</dc:creator>
      <dc:date>2014-08-29T15:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying a drools rule file using the API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/deploying-a-drools-rule-file-using-the-api/m-p/204136#M157266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Indeed - should work &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The logging seems to indicate it is correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you try adding something in the activiti:ruleVariablesInput="${order}" activiti:resultVariable="rulesOutput" parameters, just to check if those aren't mandatory?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Aug 2014 18:26:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/deploying-a-drools-rule-file-using-the-api/m-p/204136#M157266</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2014-08-30T18:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying a drools rule file using the API</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/deploying-a-drools-rule-file-using-the-api/m-p/204137#M157267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unfortunately adding input and output variables does not help. The root of the problem has to be the deployment since it says that the deployment does not contain any rules but I can't check what is exactly in the deployment in the database, can I? Another thing I'm not sure of, so it could be a problem, is the package of the .drl file. I wasn't sure how to name the package in the drools file creation so I just gave it a random name, maybe that could be the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also a little bit off-topic: How can I add .java class listeners to the .bar file. I'd like to try and run the process on Activiti Explorer, maybe that will give me more insight into the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Sep 2014 07:42:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/deploying-a-drools-rule-file-using-the-api/m-p/204137#M157267</guid>
      <dc:creator>surreal1991</dc:creator>
      <dc:date>2014-09-01T07:42:34Z</dc:date>
    </item>
  </channel>
</rss>

