[Expert] Simple Rule with declared Variables *solved*

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Expert] Simple Rule with declared Variables *solved*

Avirail
This post was updated on .
Hello people,

i have a simple question about building a rule. Is there a possibility to build something like this:

declare variableone
value : Integer = 30
end

declare variabletwo
value : Integer = 18
end

rule 'Age18'
	dialect 'mvel'
	when
		var13 : variabletwo($resultone : value)
		var12 : variableone(var12.value >= $resultone )
	then
		System.out.println("Hallo");
end

I only want to compare two declared variables, unfortunately the forum search and google donĀ“t delivered any results.

**Solution**
I used a function in the .drl File :-)

Thank you,
Philipp