org.drools.examples.process.order.logging.drl Maven / Gradle / Ivy
The newest version!
package org.drools.examples.process.order.logging
import org.drools.process.instance.impl.WorkItemImpl
import org.drools.workflow.instance.node.WorkItemNodeInstance
import org.drools.process.core.context.variable.VariableScope
import org.drools.process.instance.context.variable.VariableScopeInstance
rule "Log the execution of 'Correct Order'" salience 25
when
workItemNodeInstance: WorkItemNodeInstance( workItemId <= 0, node.name == "Correct Order" )
workItem: WorkItemImpl( state == WorkItemImpl.PENDING ) from workItemNodeInstance.getWorkItem()
then
VariableScopeInstance variableScopeInstance =
(VariableScopeInstance) workItemNodeInstance.getProcessInstance().getContextInstance(VariableScope.VARIABLE_SCOPE);
System.out.println("LOGGING: Requesting the correction of " + variableScopeInstance.getVariable("order"));
end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy