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: [email protected] 
  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
  [email protected]
  https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to