<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} @font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
@font-face
        {font-family:"Segoe UI"}
@font-face
        {font-family:Consolas}
@font-face
        {font-family:"Trebuchet MS"}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black}
span.HTMLPreformattedChar
        {font-family:Consolas;
        color:black}
span.EmailStyle21
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
.MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Pavol,</p>
<p><br>
</p>
<p>I  have increased the log level.</p>
<p>Attached is the log file for reference and also the SensitiveRole3 script which I am trying to assign to the user.<br>
</p>
<p>The error I am receiving in the  logs is :</p>
<p><br>
</p>
<p><strong>groovy.lang.MissingPropertyException: No such property: user for class: Script7 (new) approverExpression</strong><br>
<strong>com.evolveum.midpoint.util.exception.ExpressionEvaluationException: groovy.lang.MissingPropertyException: No such property: user for class: Script7 (new) approverExpression</strong><br>
    at com.evolveum.midpoint.model.common.expression.script.jsr223.Jsr223ScriptEvaluator.evaluate(Jsr223ScriptEvaluator.java:124) ~[model-common-3.0.jar:na]<br>
    at com.evolveum.midpoint.model.common.expression.script.ScriptExpression.evaluate(ScriptExpression.java:108) ~[model-common-3.0.jar:na]<br>
    at com.evolveum.midpoint.model.common.expression.script.ScriptExpressionEvaluator.transformSingleValue(ScriptExpressionEvaluator.java:58) [model-common-3.0.jar:na]<br>
    at com.evolveum.midpoint.model.common.expression.evaluator.AbstractValueTransformationExpressionEvaluator.evaluateScriptExpression(AbstractValueTransformationExpressionEvaluator.java:276) [model-common-3.0.jar:na]</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Looks like we need to define this user  variable which I am using in the script of SensitiveRole3. But not sure how to exactly define that.</p>
<p><br>
</p>
<p>Please provide your inputs for the same.</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><strong>PS :</strong></p>
<p><strong>I am not receiving any mail if I am posting any query to </strong></p>
<p><strong><strong>midpoint-dev@lists.evolveum.com</strong> . I am coordinating with my team mate SaiChandra who is  forwarding me the replies to every query which I am posting  to midpoint-dev@lists.evolveum.com. Request you to look into this.</strong></p>
<p><br>
</p>
<p>Regards,</p>
<p>Shelly<br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Sai Chandra<br>
<b>Sent:</b> 09 October 2014 21:41<br>
<b>To:</b> Shelly Piplani<br>
<b>Subject:</b> RE: [Midpoint-dev] Issues in creating approval workflow</font>
<div> </div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#2E4692">Thanks and Regards</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#2E4692">Saichandra.T</span><span style="font-family:"Trebuchet MS","sans-serif"; color:#2E4692"></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:windowtext" lang="EN-US">From:</span></b><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:windowtext" lang="EN-US"> midPoint-dev [mailto:midpoint-dev-bounces@lists.evolveum.com]
<b>On Behalf Of </b>Pavol Mederly<br>
<b>Sent:</b> 09 October 2014 14:12<br>
<b>To:</b> midpoint-dev@lists.evolveum.com<br>
<b>Subject:</b> Re: [Midpoint-dev] Issues in creating approval workflow</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Shelly,<br>
<br>
you (and I as well) need the stack trace for the error you've mentioned. Stack traces are written to the log if the logging is at DEBUG or TRACE levels.<br>
So, set you debug level to TRACE for Workflow module, try again, and post the log here.<br>
<br>
Best regards,<br>
Pavol <br>
<br>
On 8. 10. 2014 17:37, Shelly Piplani wrote:</p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<p>Hi ,</p>
<p> </p>
<p>I am trying to create approval workflow. Ihave created a manager for an Organisation Unit and created a role called SensitiveRole3 as given in the following link:</p>
<p> </p>
<p><a href="https://github.com/Evolveum/midpoint/blob/master/samples/roles/sensitive-role-3.xml" id="lnk326088">https://github.com/Evolveum/midpoint/blob/master/samples/roles/sensitive-role-3.xml</a></p>
<div id="LPBorder_GT_14127821207310.9406176249366788" style="margin-top:15.0pt; margin-bottom:15.0pt">
<table class="MsoNormalTable" style="width:80.0%; background:white; border-top:solid #CCCCCC 1.0pt; border-left:none; border-bottom:solid #CCCCCC 1.0pt; border-right:none" border="1" cellpadding="0" width="80%">
<tbody>
<tr>
<td style="width:105.0pt; border:none; padding:.75pt .75pt .75pt .75pt" valign="top" width="140">
<div id="LPImageContainer_14127821207310.8193391653218552" style="margin-top:9.0pt; background-color:rgb(255,255,255); display:table">
<p class="MsoNormal"><a href="https://github.com/Evolveum/midpoint/blob/master/samples/roles/sensitive-role-3.xml" target="_blank"><span style="text-decoration:none"><img id="_x0000_i1025" border="0" height="140" width="140" src="https://avatars3.githubusercontent.com/u/6286905?v=2&s=400"></span></a></p>
</div>
</td>
<td style="border:none; padding:.75pt .75pt .75pt .75pt" valign="top">
<div id="LPTitle_14127821207310.6602242669053672" style="margin-left:10.5pt; margin-top:6.0pt; margin-right:10.5pt">
<p class="MsoNormal"><span style="font-size:16.0pt">midpoint/sensitive-role-3.xml at master · Evolveum/midpoint · GitHub</span></p>
</div>
<div id="LPDescription_14127821207310.40828855970468614" style="margin-left:10.5pt; margin-top:6.0pt; margin-right:10.5pt">
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Segoe UI","sans-serif"">midpoint - MidPoint Identity Manager</span></p>
</div>
<div id="LPUrlContainer_14127821207310.33754568390969064" style="margin-left:10.5pt; margin-top:6.0pt; margin-right:10.5pt; margin-bottom:7.5pt; text-overflow:ellipsis; overflow:hidden">
<p class="MsoNormal"><a href="https://github.com/Evolveum/midpoint/blob/master/samples/roles/sensitive-role-3.xml" target="_blank"><span style="font-size:8.5pt">Read more...</span></a></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<p> </p>
<p> However, I have removed the  following from the role:</p>
<p> </p>
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td id="LC31" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span class="nt"><automaticallyApproved></span></p>
</td>
</tr>
<tr>
<td id="LC32" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span class="nt"><description></span>If the user works in F0006 (Scumm Bar), the assignment of this role is automatically approved for him.<span class="nt"></description></span></p>
</td>
</tr>
<tr>
<td id="LC33" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span class="nt"><script></span></p>
</td>
</tr>
<tr>
<td id="LC34" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span class="nt"><code></span>midpoint.isMemberOf(user, midpoint.getOrgByName("F0006").getOid())<span class="nt"></code></span></p>
</td>
</tr>
<tr>
<td id="LC35" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span class="nt"></script></span></p>
</td>
</tr>
<tr>
<td id="LC36" style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span class="nt"></automaticallyApproved></span><br>
<br>
<br>
<span class="nt">After assigning that Organisation unit to the user, I am trying to assign SensitiveRole3 to this user.</span><br>
<span class="nt">I am getting the following error in idm logs:</span><br>
<br>
<br>
<span class="nt">2014-10-08 20:53:21,861 [MODEL] [http-8008-5] ERROR (com.evolveum.midpoint.wf.impl.jobs.JobController): Couldn't send a request to start a process instance to workflow management system, reason: Couldn't evaluate approvers expressions</span><br>
<span class="nt">2014-10-08 20:53:21,910 [MODEL] [http-8008-5] ERROR (com.evolveum.midpoint.wf.impl.processors.primary.PrimaryChangeProcessor): Workflow process(es) could not be started, reason: Workflow process instance creation could not be requested.</span><br>
<br>
<span class="nt">Please provide your inputs on this.</span><br>
<br>
<span class="nt">Regards,</span><br>
<span class="nt">Shelly</span><br>
<br>
</p>
</td>
</tr>
</tbody>
</table>
<p> </p>
<p class="MsoNormal">This message contains information that may be privileged or confidential and is the property of ILANTUS Technologies. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized
 to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
<br>
<br>
<br>
</p>
<pre>_______________________________________________</pre>
<pre>midPoint-dev mailing list</pre>
<pre><a href="mailto:midPoint-dev@lists.evolveum.com">midPoint-dev@lists.evolveum.com</a></pre>
<pre><a href="http://lists.evolveum.com/mailman/listinfo/midpoint-dev">http://lists.evolveum.com/mailman/listinfo/midpoint-dev</a></pre>
</blockquote>
<p class="MsoNormal"><br>
This message contains information that may be privileged or confidential and is the property of ILANTUS Technologies. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain,
 copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
</p>
</div>
This message contains information that may be privileged or confidential and is the property of ILANTUS Technologies. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain,
 copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
</div>
</div>
This message contains information that may be privileged or confidential and is the property of ILANTUS Technologies. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain,
 copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
</body>
</html>