Figure 2.8 KnowledgeWorks Gspy Window
Select a rule, say, Y-N-QUESTION
, from the Rule Browser and choose Rule > GSpy from the menu bar. This brings up a Spy Window for the rule. In it you will see the actions of the rule. Now run the demo again (type (infer)
in the listener). Execution will stop when this rule fires. A message in the listener will say that the rule Y-N-QUESTION
has been called. Click on the Creep button at the bottom of the listener to single step through the rule. Watch the highlight move through the Spy Window as you go. If you still have a Monitor Window for the PLAY
rule it will be updated automatically as you go.
Click on Leap at the bottom of the listener and it will "leap" to the end of the rule. When you have finished, choose Works > Exit > Window from the Spy Window and press Leap on the listener window to remove the break point and continue normally.
At any point when rule execution is suspended by this mechanism, the other KnowledgeWorks tools may be used, for example to examine the object base (with the Objects Browser) or see which rules have fired (with the forward chaining history). Spy Windows are available for backward chaining rules as well, and they work in exactly the same way (they are set by clicking on the rule in the Rule Browser and choosing Rule > Gspy ).