20.12. Salience State Example: Agenda Group Rules "D to E"
Este contenido no está disponible en el idioma seleccionado.
20.12. Salience State Example: Agenda Group Rules "D to E"
rule "D to E"
when
State(name == "D", state == State.FINISHED )
e : State(name == "E", state == State.NOTRUN )
then
System.out.println(e.getName() + " finished" );
e.setState( State.FINISHED );
end
rule "D to E"
when
State(name == "D", state == State.FINISHED )
e : State(name == "E", state == State.NOTRUN )
then
System.out.println(e.getName() + " finished" );
e.setState( State.FINISHED );
end
Copy to ClipboardCopied!Toggle word wrapToggle overflow
This produces the following expected output:
A finished
B finished
C finished
D finished
E finished
A finished
B finished
C finished
D finished
E finished
Copy to ClipboardCopied!Toggle word wrapToggle overflow
StateExampleWithDynamicRules adds another rule to the Rule Base after fireAllRules().
Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.
Hacer que el código abierto sea más inclusivo
Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.
Acerca de Red Hat
Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.