forked from jens/Automation
fix in DateTimeTrigger management and executions when service already stopped
This commit is contained in:
@ -21,23 +21,23 @@ import java.util.List;
|
||||
|
||||
public class Rule implements Comparable<Rule>
|
||||
{
|
||||
private static ArrayList<Rule> ruleCollection = new ArrayList<Rule>();
|
||||
protected static ArrayList<Rule> ruleCollection = new ArrayList<Rule>();
|
||||
|
||||
private static List<Rule> ruleRunHistory = new ArrayList<Rule>();
|
||||
protected static List<Rule> ruleRunHistory = new ArrayList<Rule>();
|
||||
|
||||
public static List<Rule> getRuleRunHistory()
|
||||
{
|
||||
return ruleRunHistory;
|
||||
}
|
||||
|
||||
private ArrayList<Trigger> triggerSet;
|
||||
private ArrayList<Action> actionSet;
|
||||
private String name;
|
||||
private boolean ruleActive = true; // rules can be deactivated, so they won't fire if you don't want them temporarily
|
||||
private boolean ruleToggle = false; // rule will run again and do the opposite of its actions if applicable
|
||||
private Calendar lastExecution;
|
||||
|
||||
private static Date lastActivatedRuleActivationTime;
|
||||
protected ArrayList<Trigger> triggerSet;
|
||||
protected ArrayList<Action> actionSet;
|
||||
protected String name;
|
||||
protected boolean ruleActive = true; // rules can be deactivated, so they won't fire if you don't want them temporarily
|
||||
protected boolean ruleToggle = false; // rule will run again and do the opposite of its actions if applicable
|
||||
protected Calendar lastExecution;
|
||||
|
||||
protected static Date lastActivatedRuleActivationTime;
|
||||
|
||||
public Calendar getLastExecution()
|
||||
{
|
||||
@ -185,6 +185,7 @@ public class Rule implements Comparable<Rule>
|
||||
if(this.checkBeforeSaving(context, true))
|
||||
{
|
||||
Miscellaneous.logEvent("i", "Rule", "Changing rule: " + this.toString(), 3);
|
||||
|
||||
boolean returnValue = XmlFileInterface.writeFile();
|
||||
|
||||
if(returnValue)
|
||||
|
Reference in New Issue
Block a user