forked from deliveredtechnologies/rulebook
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When ERROR_ON_FAILURE, set new rule status ERROR for rule that fails. (…
- Loading branch information
1 parent
253738f
commit e2946a7
Showing
6 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,6 @@ public enum RuleStatus { | |
PENDING, | ||
SKIPPED, | ||
EXECUTED, | ||
NONE | ||
NONE, | ||
ERROR | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...eredtechnologies/rulebook/model/runner/test/rulebooks/error/condition/AfterErrorRule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.deliveredtechnologies.rulebook.model.runner.test.rulebooks.error.condition; | ||
|
||
import static com.deliveredtechnologies.rulebook.model.RuleChainActionType.ERROR_ON_FAILURE; | ||
|
||
import com.deliveredtechnologies.rulebook.annotation.Rule; | ||
import com.deliveredtechnologies.rulebook.annotation.Then; | ||
import com.deliveredtechnologies.rulebook.annotation.When; | ||
|
||
/** | ||
* Created by harshavs on 20/6/19. | ||
*/ | ||
@Rule(order = 3, ruleChainAction = ERROR_ON_FAILURE) | ||
public class AfterErrorRule { | ||
@When | ||
public boolean when() { | ||
return true; | ||
} | ||
|
||
@Then | ||
public void then() {} | ||
} |