request.adhoc.drl Maven / Gradle / Ivy
package org.jbpm.examples.request
import org.kie.api.runtime.process.WorkflowProcessInstance
rule "Automatically review large requests"
when
r: Request( $id: id, amount > 500 )
p: WorkflowProcessInstance()
String( this == $id ) from p.getVariable("request")
then
System.out.println("Automatically triggering the review process due to large amount");
kcontext.getKnowledgeRuntime().signalEvent("Review", null, p.getId());
end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy