Skip to content

Instantly share code, notes, and snippets.

@tsurdilo
Created January 6, 2011 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsurdilo/768299 to your computer and use it in GitHub Desktop.
Save tsurdilo/768299 to your computer and use it in GitHub Desktop.
package com.sample
import com.sample.Person;
import com.sample.Vehicle;
function boolean checkName(String name) {
System.out.println("hi from function...");
return true;
}
rule "xyz"
lock-on-active true
when
Person( eval( checkName(fname) ) ) or Person( eval( checkName(fname) ) )
v : Vehicle()
then
System.out.println("xyz....");
v.setModel("SomethingElse");
update(v);
Vehicle v2 = new Vehicle();
v2.setModel("Ford");
insert(v2);
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment