Hello - I need to create lots of similiar rules and I need a way to:
Disable rule for ex. 1h with rule code - I didn`t find any solution
dinamic get rule name in rule script- something like getActualRule().getName() - also not found a sollution
I now I can achieve 1 point with making dummy items witch will be store time of last execution but I search of something more complex.
Pkt 2 is to make commandLine exec with rule name to ex. mysql and check it in external script.
The Rules DSL does not provide either OOTB, but the new rule engine (JSR223) does. I haven’t tried using the functionality outside of the UI, but I would be willing to look into it, if you wanted to go in this direction.
As mentioned, the dummy Item and conditional statements that exit your Rule is your only option with Rules DSL.
It might be helpful to describe in a little more detail what you are trying to accomplish. Since you can’t actually call another Rule from a Rule (in Rules DSL) what good would getting the name of a Rule do for you?