cancel
Showing results for 
Search instead for 
Did you mean: 

drl file location

rhiremat
Champ in-the-making
Champ in-the-making
Hello Folks,

I am new to activiti as well as drools and we are evaluating the tool as an orchestration engine for one of our products.
After some struggle today I could deploy the activiti jars and in activiti-explorer\WEB-INF\lib and my ServiceTask and POJO class deployed in ctiviti-explorer\WEB-INF\classes.


Here is the code snip :

try {
            // load up the knowledge base
           KieServices ks = KieServices.Factory.get();
               KieContainer kContainer = ks.getKieClasspathContainer();
           KieSession kSession = kContainer.newKieSession("ksession-rules");
           
           ApporveReject approveReject = new ApporveReject();
           approveReject.setStatus(0);
           kSession.insert(approveReject);
           kSession.fireAllRules();
           
    }catch (Throwable t) {
            t.printStackTrace();
        }
      
Now, it seems that the drl file is not to be found. Check below :

04:49:43,078 [http-8080-1] INFO  org.drools.compiler.kie.builder.impl.ClasspathKieProject  - Found kmodule: file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat6.0/webapps/activiti-explorer/WEB-INF/classes/META-INF/kmodule.xml
04:49:43,133 [http-8080-1] INFO  org.drools.compiler.kie.builder.impl.KieRepositoryImpl  - KieModule was added:FileKieModule[ ReleaseId=1:1:1file=\Program Files\Apache Software Foundation\Tomcat6.0\webapps\activiti-explorer\WEB-INF\classes]
04:49:43,697 [http-8080-1] WARN  org.drools.compiler.kie.builder.impl.AbstractKieModule  - No files found for KieBase rules, searching folder \Program Files\Apache Software Foundation\Tomcat6.0\webapps\activiti-explorer\WEB-INF\classes

I have tried putting my drl file in following locations without success, any suggestions, pls?

activiti-explorer\WEB-INF\classes
activiti-explorer\WEB-INF\lib
activiti-explorer\WEB-INF\classes\mypkg\

Appreciate any help on this.

-Raj



5 REPLIES 5

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

It seems more like drools question from my point of view.
Did you try drools support in the activiti?
https://github.com/Activiti/Activiti/blob/master/modules/activiti-engine/src/test/java/org/activiti/...

Regards
Martin

Thanks for the reply Martin,

I could resolve this by putting the rule under proper package in the classpath.

Side Question - activiti supports drool - What do we mean by that?
What is OOB provided in activiti for that?

-Raj

jbarrez
Star Contributor
Star Contributor
Well, see http://activiti.org/userguide/index.html#bpmnBusinessRuleTask

Basically you can put drools rules together with your process and those will be handled by the drools engine.

rhiremat
Champ in-the-making
Champ in-the-making
Thank you for continued feedback on this.

I am able to create a service task and call drools rules and pass parameters to drools and get them back.
I am still not able to get the feel of Business Rule task - the documentation is good, but not in this case.

Is drools workbench UI like editor available in activiti UI OR the two are essentially separated?
Does activiti carry drools engine run time?

Sorry for bugging all, but I need to clear this up, I think I understand activiti and drools separately,
need to understand better integration (I do understand their integration from use case preservative but not technical know how aspects here).

-Raj

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Raj,

I think that the best example how the integration is implemented could be to follow jUnit test and it's spring configuration.
https://github.com/Activiti/Activiti/blob/master/modules/activiti-engine/src/test/java/org/activiti/...

org/activiti/standalone/rules/rules.activiti.cfg.xml

Regards
Martin