-
Language:
English
-
Language:
English
24.7. Pet Store Example: Show Items in the GUI from PetStore.drl
rule "Show Items"
agenda-group "show items"
dialect "mvel"
when
$order : Order( )
$p : Purchase( order == $order )
then
textArea.append( $p.product + "\n");
end
- The
show itemsagenda-group has only one rule, called "Show Items" (note the difference in case). For each purchase on the order currently in the Working Memory (or Session), it logs details to the text area at the bottom of the GUI. ThetextAreavariable used for this is a global variables. - The
evaluateAgenda group also gains focus from theExplode Cartrule.