PrevTopNext

Element Command Processing (1)

  • Generic requirements:
    • Commands must be valid for the addressed element.
    • Element state must not be contradictory to the execution of the command.
  • We would like to be able to write rules according to this pattern:
    rule "element not eligible for command x"
    when
        there is an element command
        - with the code x-ify
        and the commanded element
        - is not a x-able element
    then
        send failed command message "cannot x-ify element"
    end
    
    rule "element eligible for command x"
    when
        there is an element command
        - with the code x-ify
        and the commanded element
        - is a x-able element
    then
        execute command
    end
    

Problem: How can we reduce the number of rules?
Problem: How can we avoid duplicating conditions for error detection and processing rules?


PrevTopNext