Skip to content

Commit

Permalink
Merge pull request #7 from Extended-Green-Cloud/release-1.3
Browse files Browse the repository at this point in the history
[JRBA] Add possibility to pass rules in rule set constructor
  • Loading branch information
soffi49 authored May 8, 2024
2 parents 6c1f951 + d6e2a83 commit 318fb62
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<!-- Basic configuration of the project -->
<groupId>io.github.extended-green-cloud</groupId>
<artifactId>jrba</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
<packaging>jar</packaging>

<!-- Metadata configuration -->
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/jrba/rulesengine/ruleset/RuleSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@ protected RuleSet(final String name) {
this.callInitializeRules = true;
}

/**
* Constructor
*
* @param name name of the rule set
* @param agentRules list of agent rules (initially not connected with the controller)
*/
protected RuleSet(final String name, final List<AgentRule> agentRules) {
this.rulesEngine = new DefaultRulesEngine();
this.agentRules = agentRules;
this.name = name;
}

/**
* Method fires agent rule set for a set of facts
*
Expand Down

0 comments on commit 318fb62

Please sign in to comment.