Dynamic Rule Evaluation
iQ.Suite Tips & Tricks for IBM Domino
Since, by default, rule evaluation is entirely performed before job execution (see flow chart), a job is unable to respond dynamically to the result returned by another job.
Flow Chart: Somewhat simplified, this illustrates the standard sequence for rule evaluation and job execution.
When a job returns a result (e.g. the language of an email) and writes it to a field in the email, this will not be taken into account by the rules retroactively.
Figure 1: From the "DEFAULT - Language Identification" job
Figure 2: Result of a "DEFAULT - Language Identification" job – field AnalyseResult_Language :"EN=100"
When the job is executed, the rule still shows "False", as at the beginning of the process. Therefore, a job requiring that result will not be executed.
Figure 3: Rule that checks the content of the AnalyseResult_Language field.
Figure 4: Jobs to be executed according to the result of the language analysis.
The first job (priority: 7000) in the example checks the language
of an email, creates an AnalyseResult_Language field and writes the
identified language to that field (see Figure 1 and Figure 2).
The subsequent jobs should run if this field exists and contains a language information. Here, the email is checked using a dictionary (German dictionary for German text, English dictionary for English text).
For this to happen, the applicable rules (i.e. only the rules needed for this job – not the entire set of rules) need to be evaluated again.
This requires to perform the following preparatory steps:
Set the global parameter Dynamic Rule Evaluation to "Yes" and then enable it.
Figure 5: Global parameter
In the job, set the "Rule Execution Mode" (only available if the parameter above has been enabled) to "Just before the Job".
Figure 6: Job that depends on the result of another job
With these two settings, the rules used by the job are evaluated one more time right before the job is run.
This allows to respond dynamically to the results of previous jobs.