Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
19.6. HelloWorld Example: Rule "Hello World"
- The LHS (after
when
) section of the rule states that it will be activated for eachMessage
object inserted into the Working Memory whose status isMessage.HELLO
. - Two variable bindings are created: the variable
message
is bound to themessage
attribute and the variablem
is bound to the matchedMessage
object itself. - The RHS (after
then
) or consequence part of the rule is written using the MVEL expression language, as declared by the rule's attributedialect
. - After printing the content of the bound variable
message
toSystem.out
, the rule changes the values of themessage
andstatus
attributes of theMessage
object bound tom
. - MVEL's
modify
statement allows you to apply a block of assignments in one statement, with the engine being automatically notified of the changes at the end of the block.