How to call the java method in when in drools rule file
This article introduces the knowledge of "how to call the java method in drools rules file in when". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
To declare the variable $op: OP ()
Dialect "java"
Import com.topnet.ruleengine.bean.OP
Import com.topnet.ruleengine.op.Executor
Rule "test"
When
$op: OP ()
Eval (Executor.abc ($op) > 0)
Then
System.out.println ("test")
End
Official documents:
Https://docs.jboss.org/drools/release/6.2.0.CR3/drools-docs/html/DroolsLanguageReferenceChapter.html#d0e7455
This is the end of the content of "how to call the java method in the drools rule file in when". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!