[removed on request of the openHAB Foundation]
Now I finally have a reason to upgrade to openHAB 3
Is this different or the same as this?
Different. This one also works for UI rules.
Why did you create this bundle JNK? You forked the JRule repo and made changes and then created a new addon based on it? Why not add this support to JRule directly?
I originally started a fork, but found that what I had in mind (e.g. using the core data types) required something similar to a full rewrite (what you already guessed in our conversation). I then picked up my original approach (which I mentioned in the JRule thread) based on an external scripting engine and finished that one. If you check, this code has nothing to do with your code. The only idea I took from your code was building a library that the user can import.
Ok thank you for the explanation, no insult taken was just curious why it looked similar with the annotations etc.
Would like to see those who want to write Rules using Java to team up so far 3 people have contributed to JRule, but know there are quite few more that are actually using it.
I can bring third one but without such stellar docs and fast install options:. Sample rule: https://github.com/ConnectorIO/connectorio-addons/blob/master/bundles/org.connectorio.addons.norule/src/test/java/org/connectorio/addons/norule/ActualCopRule.java
To outline differences - above does not work with UI and allows “static” distribution of rules through JAR files.
Documentation looks really good and clear and examples will be of a great help.
I will try it.
Could you please provide an example with a scheduled task inside a rule, this is the only point not fully clear for me.
I would like to know if there are plans to include that in the official openHAB distribution ?
And for shared variables between several rules, I imagine a specific class with variables as members, referenced in each rule class?
Maybe an example would be welcome.
I have updated the examples: Java Rule Automation. This will be included in the next release