Search code examples
jess

Ordering the activation of modules in jess


I am using JESS to write a program which eliminates some elements in the deftemplate for each rule that is fired.

I want to print out the results to a file after all rules have been fired. I have put all the rules which effect the deftemplate in a defmodule, and made two seperate modules for reporting the results. but the point is the reporting modules are executed in between and therefore there rules will be fired, I want to have the report modules executed at the end, Can I use the defadvice after halt? shall I add another rule saying that when all other rules from MAIN module are fired, then (focus Report1 Report2)?

Any assist will be appreciated,

Ali


Solution

  • You could put all the changing rules into a named module and

    (focus Changes Report1 Report2)