public final class TriggerList extends Object
TriggerElement
-s with a global condition valid for all of them.
Each TriggerElement
in turn, is a 'Rule Fire' definition and respective condition for this Fire.
In these terms, 'Rule Fire' stands for initiative for evaluating given triggering condition.
Rule Fires can be event-driven (reasoning automation), timer-driven (schedule automation) or manual-fires.
Once a TriggerElement is 'fired', its respective condition Trigger.getTriggerCondition()
is evaluated.Evaluation result is boolean value - true
or false
.
Then global condition is evaluated analogically and if both evaluations result to true
Triggering of a Rule results in launching a new Task that executes the Rule groovy action, with respect to
the Rule ExecOptions
.Modifier and Type | Method and Description |
---|---|
TriggerList |
addTriggerelement(Trigger el)
Adds additional trigger element to this trigger.
|
static TriggerList |
create(Trigger el)
Creates a trigger with one trigger element.
|
String |
getGeneralCondition()
Returns the general condition defined for this trigger.
|
Trigger[] |
getTriggerElements()
Returns the list of trigger elements for this trigger.
|
TriggerList |
setGeneralCondition(String generalCondition)
Sets the general condition for this trigger.
|
String |
toString() |
public static TriggerList create(Trigger el)
el
- trigger element.Trigger
object having supplied setting.public TriggerList addTriggerelement(Trigger el)
el
- trigger element.Trigger
object having supplied setting.public TriggerList setGeneralCondition(String generalCondition)
true
or false
.generalCondition
- general condition in the form of a groovy script.Trigger
object having supplied setting.public Trigger[] getTriggerElements()
public String getGeneralCondition()
Copyright © 2022 Bosch.IO GmbH. All rights reserved.