I am having issue setting the priority of the rule at runtime. I know if I use RuleBuilder, I can set the priority, but then I have to override the when and then and then build the rule. But in my case, I am getting the list of rules name (to be executed) at run time and the user can specify the order of these rules should be executed.
Can you please provide some guidance on how to implement this? I am using the annotation at the Rule component creation like @Rule(name = "SomeRule", description = "Description of Rule User", priority = 2), the priority of this is hardcoded, and I want to someway set this priority at run time.
Hi,
I am having issue setting the priority of the rule at runtime. I know if I use RuleBuilder, I can set the priority, but then I have to override the
when
andthen
and then build the rule. But in my case, I am getting the list of rules name (to be executed) at run time and the user can specify the order of these rules should be executed. Can you please provide some guidance on how to implement this? I am using the annotation at the Rule component creation like@Rule(name = "SomeRule", description = "Description of Rule User", priority = 2)
, the priority of this is hardcoded, and I want to someway set this priority at run time.Thanks, DS