<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space" 
bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Femke,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>That error occurs when you are trying to execute 
the Human Task node.&nbsp; 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).&nbsp; These mappings however do not work for 
global variables, only for variables that are defined in the process 
itself.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I think the best solution would be to create a 
patient variable and&nbsp;assign the patient to that variable when starting the 
process.&nbsp; 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).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=femmyke@gmail.com href="mailto:femmyke@gmail.com">Femke De 
  Backere</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=rules-users@lists.jboss.org 
  href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A> 
  </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, January 30, 2009 3:05 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [rules-users] Globals</DIV>
  <DIV><BR></DIV><FONT class=Apple-style-span face=Arial>Hi!</FONT>
  <DIV><FONT class=Apple-style-span face=Arial><BR></FONT></DIV>
  <DIV><FONT class=Apple-style-span face=Arial>I'm trying to set a global for my 
  ruleflow in Drools 5 M5.&nbsp;</FONT></DIV>
  <DIV><FONT class=Apple-style-span face=Arial><BR></FONT></DIV>
  <DIV>
  <DIV style="MARGIN: 0px; FONT: 11px Monaco"><FONT class=Apple-style-span 
  face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Patient 
  patient = </SPAN></FONT><SPAN style="COLOR: #7f0055"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">new</SPAN></FONT></SPAN><FONT class=Apple-style-span 
  face=Arial size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px"> 
  Patient();</SPAN></FONT></DIV>
  <DIV style="MARGIN: 0px; FONT: 11px Monaco"><FONT class=Apple-style-span 
  face=Arial size=3><SPAN class=Apple-style-span style="FONT-SIZE: 12px">&nbsp; 
  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </SPAN></FONT><SPAN 
  style="COLOR: #0000c0"><FONT class=Apple-style-span face=Arial size=3><SPAN 
  class=Apple-style-span 
  style="FONT-SIZE: 12px">ksession</SPAN></FONT></SPAN><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">.setGlobal(</SPAN></FONT><SPAN 
  style="COLOR: #2a00ff"><FONT class=Apple-style-span face=Arial size=3><SPAN 
  class=Apple-style-span 
  style="FONT-SIZE: 12px">"patient"</SPAN></FONT></SPAN><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">, patient);</SPAN></FONT></DIV>
  <P style="MIN-HEIGHT: 15px; MARGIN: 0px; FONT: 11px Monaco"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<BR 
  class=webkit-block-placeholder></SPAN></FONT></P>
  <P style="MIN-HEIGHT: 15px; MARGIN: 0px; FONT: 11px Monaco"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">But I always get the following 
error:</SPAN></FONT></P>
  <P style="MIN-HEIGHT: 15px; MARGIN: 0px; FONT: 11px Monaco"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">"Could not find variable scope for variable patient 
  when trying to execute Work Item Human Task&nbsp;</SPAN></FONT></P>
  <P style="MIN-HEIGHT: 15px; MARGIN: 0px; FONT: 11px Monaco"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">&nbsp;&nbsp; Continuing without setting 
  parameter."</SPAN></FONT></P>
  <P style="MIN-HEIGHT: 15px; MARGIN: 0px; FONT: 11px Monaco"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px"><BR></SPAN></FONT></P>
  <P style="MIN-HEIGHT: 15px; MARGIN: 0px; FONT: 11px Monaco"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">Does anyone know what I'm doing 
  wrong?</SPAN></FONT></P>
  <P style="MIN-HEIGHT: 15px; MARGIN: 0px; FONT: 11px Monaco"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px"><BR></SPAN></FONT></P>
  <P style="MIN-HEIGHT: 15px; MARGIN: 0px; FONT: 11px Monaco"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">Thx!</SPAN></FONT></P>
  <P style="MIN-HEIGHT: 15px; MARGIN: 0px; FONT: 11px Monaco"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px"><BR></SPAN></FONT></P>
  <P style="MIN-HEIGHT: 15px; MARGIN: 0px; FONT: 11px Monaco"><FONT 
  class=Apple-style-span face=Arial size=3><SPAN class=Apple-style-span 
  style="FONT-SIZE: 12px">Femke</SPAN></FONT></P></DIV>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>rules-users mailing 
  list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE></BODY></HTML>