<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p>Hi,<o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p>I am new to Rules and having following issues in different rules.<o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><strong>Rule 1 :</strong><o:p></o:p></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; <u>Issue</u><o:p></o:p></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I have a process definition in which I create and insert into Session a REQUEST.java object before the rule-flow node. Insert is done using script node. In rule condition section I am filtering&nbsp; the same request object but my rule is not firing.
 My rule FIRES if I REMOVE <span style="color:red">this == $process.getVariable(&quot;piRequest&quot;).</span><o:p></o:p></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rule &quot;Go to President&quot;</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ruleflow-group &quot;DesigSkip&quot;</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dialect &quot;java&quot;</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $process: WorkflowProcessInstance()</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $r: Request(<span style="color:red">this == $process.getVariable(&quot;piRequest&quot;)</span>, VD == &quot;N&quot;, UB == &quot;N&quot;, CC not in ( &quot;A&quot;, &quot;B&quot;) , DP not in (&nbsp; &quot;X&quot;, &quot;Y&quot;, &quot;Z&quot;) );</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $process.setVariable(&quot;piToPres&quot;,&quot;y&quot;);</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end</em><o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><strong>Rule 2 :</strong> <o:p></o:p></p>
<p>&nbsp;&nbsp;&nbsp; I am getting error for eval statement.<o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><em>globa Request $r;</em><o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><em>rule &quot;Go to President&quot;</em><o:p></o:p></p>
<p><em>ruleflow-group &quot;DesigSkip&quot;</em><o:p></o:p></p>
<p><em>dialect &quot;java&quot;</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp; when</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp; $process: WorkflowProcessInstance($request:getVariable(&quot;piRequest&quot;))</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp; $r : $request</em><o:p></o:p></p>
<p><span style="color:red">&nbsp;&nbsp;&nbsp; $r(eval(</span><em><span style="color:red">ADV == &quot;N&quot;</span></em><span style="color:red">))</span>
<o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp; then</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&quot;--------------------*******************--------IN GUIDED&nbsp;&nbsp;&nbsp;&nbsp; RULE--------**********************---------------&quot;);</em><o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $process.setVariable(&quot;piToPres&quot;,&quot;y&quot;);</em><o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><em>end</em><o:p></o:p></p>
<p><o:p>&nbsp;</o:p></p>
<p><em>globa Request $r;</em><o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><em>rule &quot;Go to President&quot;</em><o:p></o:p></p>
<p><em>ruleflow-group &quot;DesigSkip&quot;</em><o:p></o:p></p>
<p><em>dialect &quot;java&quot;</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp; when</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp; $process: WorkflowProcessInstance($request:getVariable(&quot;piRequest&quot;))</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp; $r : $request</em><o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp; eval($r.getADV() == &quot;N&quot;)</em><o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp; then</em><o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(&quot;--------------------*******************--------IN GUIDED&nbsp;&nbsp;&nbsp;&nbsp; RULE--------**********************---------------&quot;);</em><o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $process.setVariable(&quot;piToPres&quot;,&quot;y&quot;);</em><o:p></o:p></p>
<p style="min-height: 8pt">&nbsp;<o:p></o:p></p>
<p><em>end</em><o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td valign="top" style="border:none;border-bottom:solid #CCCCCC 1.0pt;padding:0cm 0cm 2.85pt 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:black;mso-fareast-language:EN-GB">&nbsp;Zahid Ahmed<br>
&nbsp;Senior Software Engineer </span><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#D81921;mso-fareast-language:EN-GB">|</span><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:black;mso-fareast-language:EN-GB">&nbsp;Emirates
 Group IT<br>
&nbsp;P.O. Box 686&nbsp;</span><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#D81921;mso-fareast-language:EN-GB">|</span><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:black;mso-fareast-language:EN-GB">&nbsp;Dubai, United Arab
 Emirates<br>
&nbsp;<b>T</b> &#43;971&nbsp;4 203 3912&nbsp;</span><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:#D81921;mso-fareast-language:EN-GB">|</span><span style="font-size:9.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:black;mso-fareast-language:EN-GB">&nbsp;<b>M</b>
 &#43;971&nbsp;55 1249171 </span><span style="font-size:12.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="mso-fareast-language:EN-GB"><img width="114" height="71" id="_x0000_i1025" src="cid:image001.jpg@01CEF736.C8635210" alt="http://cdn.ek.aero/email/e_signatures/ekg2013.jpg"></span><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>