Author Topic: Enable/Disable Rule via script  (Read 3397 times)

Aslamma

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Enable/Disable Rule via script
« on: April 17, 2010, 04:34:02 pm »
Can there be Simpler way to enable or disable a rule via script?   This would be good for things like security rules or changing what happens when a motion sensor is tripped, etc.  Although it can be done with global vars, it requires more coding and more things to keep track of. 

mikedj

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
Re: Enable/Disable Rule via script
« Reply #1 on: September 13, 2010, 07:21:53 am »
A script statement that allows direct enabling and disabling of a Rule from within another Rule.

Thanks,
Mike

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Enable/Disable Rule via script
« Reply #2 on: June 14, 2012, 09:17:18 pm »
I am looking into this.

The terms Enable and Disable Rule already apply to a rule's configuration. Disabling a rule prevents it from being loaded into the device.

We need a different set of terms for preventing a rule from being executed via the scripting language when it's event is triggered.

Perhaps Activate/Deactivate?  Although Activate make it sound like you want to run the rule. 

What do you guys think?
John Hughes
Codecore Technologies

mikedj

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
Re: Enable/Disable Rule via script
« Reply #3 on: June 15, 2012, 04:27:07 am »
Off the top of my head, I think Enable/Disable really covers it best, but I understand the problem using those terms.  Any chance of changing the current Enable/Disable terms to something like Load/Don'tLoad or Load/Bypass or some such thing?

If not, here are some possible terms:

EnableRun/DisableRun
EnableRule/DisableRule
Arm/Disarm
EnableExecution/DisableExecution
MakeExecuteable/MakeNonExecutable
Executeable/Bypass


Mike

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Enable/Disable Rule via script
« Reply #4 on: June 17, 2012, 07:19:25 pm »
If it were just Rules I wouldn't mind changing the Disabled/Enabled terminology but this is used for devices and other areas as well.

A couple other terms:
Turn On/ Turn Off
Allow Execution/Disallow Execution
Suspend/Resume
Bypass
Ignore
« Last Edit: June 17, 2012, 07:43:24 pm by John Hughes »
John Hughes
Codecore Technologies

mikedj

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
Re: Enable/Disable Rule via script
« Reply #5 on: June 20, 2012, 08:21:14 am »
Another possible option:

Activate/Deactivate

Mike

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Enable/Disable Rule via script
« Reply #6 on: June 20, 2012, 09:08:15 am »
Another possible option:

Activate/Deactivate

Mike

That is what I originally used but then thought "Activate" sounded like you were running the rule.
John Hughes
Codecore Technologies

mikedj

  • Jr. Member
  • **
  • Posts: 49
    • View Profile
Re: Enable/Disable Rule via script
« Reply #7 on: June 20, 2012, 09:22:53 am »
I had forgotten you mentioned that earlier.

Unfortunately, I have not been able to settle on one set of terms I think is best.

Mike

John Hughes

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
    • View Profile
    • Codecore Technologies
Re: Enable/Disable Rule via script
« Reply #8 on: June 25, 2012, 12:01:56 pm »
This is implemented and working for Elve 2.0. I'll have to ponder the terms.
John Hughes
Codecore Technologies