pub struct Eligibility {
pub auto: Option<Auto>,
pub run_once: Option<bool>,
pub run_once_per_session: Option<bool>,
pub continuation: Option<bool>,
pub predicates: Vec<Predicate>,
pub logical_operator: Option<PredicateLogicalOperator>,
}
Expand description
The conditions that determine when an activity should execute.
Fields§
§auto: Option<Auto>
An object that automatically generates a boolean control setting and corresponding predicate.
run_once: Option<bool>
Indicates whether the activity should run only once across all file/analysis sessions. Once the activity runs, its state is saved persistently, and it will not run again unless explicitly reset. This is useful for activities that only need to be performed exactly once, such as initial setup tasks.
run_once_per_session: Option<bool>
Indicates whether the activity should run only once per session. Its state is not persisted, so it will run again in a new session. This is useful for activities that should be performed once per analysis session, such as initialization steps specific to a particular execution context.
continuation: Option<bool>
Indicates if a subflow is eligible for re-execution based on its eligibility logic.
predicates: Vec<Predicate>
Objects that define the condition that must be met for the activity to be eligible to run.
logical_operator: Option<PredicateLogicalOperator>
Logical operator that defines how multiple predicates are combined.
Implementations§
source§impl Eligibility
impl Eligibility
sourcepub fn without_setting() -> Self
pub fn without_setting() -> Self
Creates a new instance without an automatically generated boolean control setting. The activity is eligible to run by default.
sourcepub fn auto() -> Self
pub fn auto() -> Self
Creates a new instance with an automatically generated boolean control setting and corresponding predicate. The setting is enabled by default.
sourcepub fn auto_with_default(value: bool) -> Self
pub fn auto_with_default(value: bool) -> Self
Creates a new instance with an automatically generated boolean control setting and corresponding predicate.
The setting has the value value
by default.
sourcepub fn run_once(self, value: bool) -> Self
pub fn run_once(self, value: bool) -> Self
Sets the run_once
field, indicating whether the activity should run only once across all file/analysis sessions.
sourcepub fn run_once_per_session(self, value: bool) -> Self
pub fn run_once_per_session(self, value: bool) -> Self
Sets the run_once_per_session
field, indicating whether the activity should run only once per session.
sourcepub fn continuation(self, value: bool) -> Self
pub fn continuation(self, value: bool) -> Self
Sets the continuation
field, indicating whether a subflow is eligible for re-execution based on its eligibility logic.
sourcepub fn predicate(self, predicate: impl Into<Predicate>) -> Self
pub fn predicate(self, predicate: impl Into<Predicate>) -> Self
Sets the predicate that must be satisfied for the activity to be eligible to run.
sourcepub fn matching_any_predicate(self, predicates: &[Predicate]) -> Self
pub fn matching_any_predicate(self, predicates: &[Predicate]) -> Self
Sets the predicates that must be satisfied for the activity to be eligible to run. If multiple predicates are provided, they are combined using a logical OR.
sourcepub fn matching_all_predicates(self, predicates: &[Predicate]) -> Self
pub fn matching_all_predicates(self, predicates: &[Predicate]) -> Self
Sets the predicates that must be satisfied for the activity to be eligible to run. If multiple predicates are provided, they are combined using a logical AND.