[rules-users] Globals
Kris Verlaenen
kris.verlaenen at cs.kuleuven.be
Mon Feb 2 11:36:23 EST 2009
Femke,
That error occurs when you are trying to execute the Human Task node. In you human task node, you probably have a mapping from the patient variable to a parameter of the human task (either by mapping the variable directly using the in-mappings property or by using #{patient} inside one of the properties). These mappings however do not work for global variables, only for variables that are defined in the process itself.
I think the best solution would be to create a patient variable and assign the patient to that variable when starting the process. This will solve your issue and even allow you to reuse the same session for different patients (as the patient is no longer globally defined but specific to a process instance).
Kris
----- Original Message -----
From: Femke De Backere
To: rules-users at lists.jboss.org
Sent: Friday, January 30, 2009 3:05 PM
Subject: [rules-users] Globals
Hi!
I'm trying to set a global for my ruleflow in Drools 5 M5.
Patient patient = new Patient();
ksession.setGlobal("patient", patient);
But I always get the following error:
"Could not find variable scope for variable patient when trying to execute Work Item Human Task
Continuing without setting parameter."
Does anyone know what I'm doing wrong?
Thx!
Femke
------------------------------------------------------------------------------
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090202/54ec465f/attachment.html
More information about the rules-users
mailing list