cancel
Showing results for 
Search instead for 
Did you mean: 

BusinessRuleTask - deploy error

rdenner
Champ in-the-making
Champ in-the-making
Hi,

I want to use the new BusinessRuleTask element for a test.
I defined a rule (drl) file, which I include in the Business Archive (bar).
I modeled a simple process and two forms. The BusinessRuleTask
executes 2 rules, gets 2 input variables and delivers 1 result variable.

Here is an example of one of my rules:


rule "salarycheck"

when
    (salary > 3000) && (age < 30)
then
    ruleOutput = "pattern1";
end

I wanted to deploy the bar file, but I get the error:
java.lang.NoClassDefFoundError: org/drools/runtime/rule/AgendaFilter

Do I need the Drools package for working with the BusinessRuleTask?
Does anyone have a simple example?

Thanks & Regards,
Rainer.
33 REPLIES 33

vasanthmiste
Champ in-the-making
Champ in-the-making
Hi,
  I have done all the steps that mentioned in this thread, but still i am getting 'deployment xxxx doesn't contain any rules' exception.

  I tried with your rule demo package also, i am using Activiti5.7.

Do i need to anything other than mentioned here..

trademak
Star Contributor
Star Contributor
Hi,

Did you try this out on the Activiti Explorer?
You can find a full example about using the business rule tasks here (http://code.google.com/p/activitiinaction/). A lot more details are in chapter 12 of the Activiti in Action book.

Best regards,

vasanthmiste
Champ in-the-making
Champ in-the-making
Yea, i did it explorer only. Do we need to make any changes in the activiti applications like config file changes..


Could you please share the steps to deply and run the demo project[that you attached in this thread] once after the successful setup of activiti.

This is would be greatly helpful..

trademak
Star Contributor
Star Contributor
I would recommend reading chapter 12 of Activiti in Action, because it's all explained there.

Best regards,

mikedias
Champ in-the-making
Champ in-the-making
Sorry to resurrect the topic, but I am starting development using the Activiti and I like it.

However, I found strange create a Service Task to initialize a bean with the Process Variables and send the bean to Drools.

Can I just pass the DelegateExecution object with all variables to Drools? Will be more flexible.

Thanks.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
If you do not use the existing businessrule task but create your own service task, you might get this working. But the delegate execution is such a 'low level' object that it is not common to do this.

mikedias
Champ in-the-making
Champ in-the-making
Ronald, thanks for answer!

Create my service task is a interesting way. I will test this.

But I think that the default behavior of the Business Rule Task should be send all Process Variables to Drools into a wrapper. This is just my impression about this, please correct me if I'm wrong!

Thanks.

trademak
Star Contributor
Star Contributor
Hi Mike,

Well, that's certainly a possibility. If you don't specify input variables automatically all variables of the execution are added to the Drools execution.
Let me know if that's what you are looking for.

Best regards,

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Hmmmm, personally I don't like these kinds of defaults…

trademak
Star Contributor
Star Contributor
Hi,

We could also add an additional attribute like copyProcessVariables that defaults to false and that you can set to true.

Best regards,