Hi,
I am on 2.4.0 Distribution.
From Rules creation, i am able to choose “execute a given script”, my question is can u pass argument to the script? Also, i assume that javascript file here refers to JRS223 which is located in conf/automation/jr223? Thanks
rossko57
(Rossko57)
May 21, 2019, 12:54pm
#2
Might help
Your First Rule
Prerequisites
Create a Switch Item named Test. We will use this to trigger our Rule. Give the Item a label because the Items are listed alphabetically by label. If you skip the label, the Item ends up at the bottom of the list.
Create the Rule
In PaperUI, select Rules from the left.
Press the big + to create a new Rule.
[image]
You will find several fields to fill out.
[image]
Field
What to fill in
Name
Give the Rule a unique and meaningful name.
Description
Expla…
[Edit: Moved the Actions to their own
Writing Scripts
As you can see a lot can be accomplished in the NGRE without writing scripts at all. Much more than is possible with just Items. However at some point writing a script will be required. We know that the scripts entered into the Script box need to be JavaScript but how do we do all the stuff we are used to in Rules DSL like creating Timers, calling Actions, working with Groups and Items?
JSR223
Remember when I wrote that users of JSR223 Rule…