agent.rules package¶
Submission event rules.
A rule defines the circumstances under which a process should be carried out. Specifically, a rule is associated with a particular type of event, and a function that determines whether the process should be carried out based on the event properties and/or the state of the submission.
Rules are implemented by instantiating Rule
in this module.
-
agent.rules.
evaluate
(event, before, after)¶ Evaluate an event against known rules.
- Parameters
event (
domain.Event
) – The event to evaluate.before (
domain.submission.Submission
) – The state of the submission prior to the event.after (
domain.submission.Submission
) – The state of the submission after the event.
- Return type
- Returns
iterable – Each item is a two-tuple, composed of a triggered
Process
instance and the configuration parameters with which it should be run.