Open mohdArshad9 opened 4 years ago
If I am building a Rule .
RuleBuilder.create().withName("Rule1") .withResultType(Boolean.class) .withFactType("fact") .when(facts -> true) .then(facts -> { } ))
The rule name is dropping.In RuleBuilder.java line number 92 rule name is not copying from builder.
public <S> RuleBuilder<S, U> withFactType(Class<S> factType) { RuleBuilder<S, U> builder = new RuleBuilder<>(_ruleClass); builder._factType = factType; builder._resultType = _resultType; builder._actionType = _actionType; return builder; }
If we are building like this. It is working.
RuleBuilder.create() .withFactType("fact") .withName("Rule1") .withResultType(Boolean.class) .when(facts -> true) .then(facts -> { } ))
In RuleBuilder.java line number 106 rule name is copying from builder.So it is working.
public <S> RuleBuilder<T, S> withResultType(Class<S> resultType) { RuleBuilder<T, S> builder = new RuleBuilder<>(_ruleClass); builder._factType = _factType; builder._resultType = resultType; builder._actionType = _actionType; builder._name = _name; return builder; }
To avoid the maintaining order at rule building time.
Can I do a PR for it?
RuleBuilder.java line number 92.
public <S> RuleBuilder<S, U> withFactType(Class<S> factType) { RuleBuilder<S, U> builder = new RuleBuilder<>(_ruleClass); builder._factType = factType; builder._resultType = _resultType; builder._actionType = _actionType; builder._name = _name; return builder; }
Yes, pls.
If I am building a Rule .
RuleBuilder.create().withName("Rule1") .withResultType(Boolean.class) .withFactType("fact") .when(facts -> true) .then(facts -> { } ))
The rule name is dropping.In RuleBuilder.java line number 92 rule name is not copying from builder.
public <S> RuleBuilder<S, U> withFactType(Class<S> factType) { RuleBuilder<S, U> builder = new RuleBuilder<>(_ruleClass); builder._factType = factType; builder._resultType = _resultType; builder._actionType = _actionType; return builder; }
If we are building like this. It is working.
RuleBuilder.create() .withFactType("fact") .withName("Rule1") .withResultType(Boolean.class) .when(facts -> true) .then(facts -> { } ))
In RuleBuilder.java line number 106 rule name is copying from builder.So it is working.
public <S> RuleBuilder<T, S> withResultType(Class<S> resultType) { RuleBuilder<T, S> builder = new RuleBuilder<>(_ruleClass); builder._factType = _factType; builder._resultType = resultType; builder._actionType = _actionType; builder._name = _name; return builder; }
To avoid the maintaining order at rule building time.
Can I do a PR for it?
RuleBuilder.java line number 92.
public <S> RuleBuilder<S, U> withFactType(Class<S> factType) { RuleBuilder<S, U> builder = new RuleBuilder<>(_ruleClass); builder._factType = factType; builder._resultType = _resultType; builder._actionType = _actionType; builder._name = _name; return builder; }