Questions tagged [easy-rules]
12 questions
6
votes
2 answers
How to use variables in easy rules?
I am using JSON descriptor to load rules using easy-rules and I want to use variables in easy rules actions. For example I have a set of rules where I define rule id, name, description as given below
[
{
"id": 1,
"name": "Task using Oracle…

Ricky
- 314
- 1
- 7
- 22
1
vote
1 answer
easy-rules: is there an if-else rule?
I am trying to work with easy-rules.
Can we have an if-else rule executed using easy-rules?
I have checked on ActivationRuleGroup and ConditionalRuleGroup, but it seems it's only all if's.
1
vote
1 answer
Easy-rules: Cannot resolve aNewRulesEngine()
The code below cannot be compiled due to 'cannot find symbol
symbol: class aNewRulesEngine
location: class org.jeasy.rules.core.RulesEngineBuilder'
However, judging by this tutorial https://github.com/j-easy/easy-rules/wiki/fizz-buzz it should…

Adam
- 842
- 2
- 14
- 22
0
votes
0 answers
java Easy Rule - MVELRule does not work in case of primitive type
Recently, our business requires the configurable calculation for delivery cost.I searched resolutions from net, the Easy Rule is recommended. I studied it, and chose MVELRule. But it executes unexpectedly.
mycode:
int price = 10;
…

cheng gen
- 26
- 2
0
votes
1 answer
Easy rules is stateless?
Does easy-rules support a stateful rule-engine like Drools?
I would like to re-execute other rules if the fact is updated by one of the rule.
Please let me know if this is supported by easy-rules.

Subra M
- 581
- 1
- 8
- 16
0
votes
1 answer
Method does not override or implement a method from a supertype on Eclipse with interface and Easy Rules
Compiler compliance configuration in Eclipse
I am running into this popular error "method does not override or implement a method from a supertype" in my code. I have spent nearly 5 hours reading on various solutions offered in the past and none of…

Plutoverse
- 13
- 4
0
votes
1 answer
easyrule-nar file is not adding any process to nifi
I am using nifi 1.12.1 version
I was trying use easyrule rule engine in nifi hence downloaded a nar file nifi-easyrules-nar-1.13.2.2.1.1.0-13.nar from https://mvnrepository.com/artifact/org.apache.nifi/nifi-easyrules-nar/1.13.2.2.1.1.0-13
Copied the…

graceful
- 126
- 7
0
votes
1 answer
How can I use rule in a kind of recurisve way
By walking through a tree structure I have to check at each tree-level whether some nodes at that level fulfill certain criterials and then do some related action. Without easyrules, this can be implemented in a recursive call where nodes at each…

PengL
- 1
- 1
0
votes
1 answer
How can I define that only one rule has to be executed in EasyRules?
I'm using easy-rules to evaluate a set of escenarios, each of them will execute a different logic. I want to make sure that from all the rules registered only one gets executed, I have the following code:
public static void main(String[] args) {
…

Alejandro Agapito Bautista
- 1,344
- 1
- 15
- 35
0
votes
1 answer
Easy-rules: set rule name in a POJO using a contructor
I have the following Rule
@Rule
@Slf4j
public class ModuleRule{
private Content content;
private String baseDir;
@Condition
public boolean when(Facts facts) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException…

user3727540
- 922
- 3
- 11
- 30
0
votes
1 answer
How do I write a rule in easy-rules which takes an array of string and checks a fact string using contains?
I am using expression-language-support to write rules in json format using easy-rules.
MVELRuleFactory ruleFactory = new MVELRuleFactory(new JsonRuleDefinitionReader())
Rules rules = ruleFactory.createRules(new FileReader("user-role-rule.json"))
2…

Ricky
- 314
- 1
- 7
- 22
0
votes
1 answer
how to write condition using j-easy easy-rules to find any matching value in a set
I would like to write a condition to evaluate if any one of the set values in the facts, meets the condition.
This is my rule definition:
public void evaluateRule(Facts facts, String ruleNum) {
SpRuleDefinition spRuleDefinition =…

manish kumar
- 15
- 1
- 6