<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    My issue with Task Service
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/bhaskarven">Bhaskaran Venkataraman</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/740082#740082">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I have a simple workflow having a script task, 2 human tasks in succession and then finally another script task.</p><p>Each of the human tasks have a form to be displayed and an approve button. I initially tried the basic process</p><p>without my own task client. It worked but when the actor for the second human task approved the form it came up</p><p>with the following error message. The actor for the first human task is krisv and when he approved the form it went OK.</p><p>But when the actor of the second human task which is john tried to approve his form it gave this exception about krisv</p><p>which did not make any sense he is not at all involved with the second human task.</p><p><span></span></p><pre class="western" style="font-weight: normal;">org.jboss.resteasy.spi.UnhandledException: org.jbpm.task.service.PermissionDeniedException: Server-side Exception: User '[User:'krisv']' does not have permissions to execution operation 'Start' on task id 5</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><table><tbody><tr><td style=";">&#160; </td><td style=";">&lt;potentialOwner&gt;</td></tr><tr><td style=";">&#160;&#160;&#160; </td><td style=";">&lt;resourceAssignmentExpression&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;formalExpression&gt;krisv&lt;/formalExpression&gt;</td></tr><tr><td style=";">&#160;&#160;&#160; </td><td style=";">&lt;/resourceAssignmentExpression&gt;</td></tr><tr><td style=";">&#160; </td><td style=";">&lt;/potentialOwner&gt;</td></tr></tbody></table><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><table><tbody><tr><td style=";">&#160; </td><td style=";">&lt;potentialOwner&gt;</td></tr><tr><td style=";">&#160;&#160;&#160; </td><td style=";">&lt;resourceAssignmentExpression&gt;</td></tr><tr><td style=";">&#160;&#160;&#160;&#160;&#160; </td><td style=";">&lt;formalExpression&gt;john&lt;/formalExpression&gt;</td></tr><tr><td style=";">&#160;&#160;&#160; </td><td style=";">&lt;/resourceAssignmentExpression&gt;</td></tr><tr><td style=";">&#160; </td><td style=";">&lt;/potentialOwner&gt;</td></tr></tbody></table><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Then I tried creating a Mina task client and processing the task in code. I can get the task, claim, start and complete it.</p><p>But then how do I view the forms and approve it. I have to go back to the JBPM console. Even the human task panel </p><p>in eclipse only allows to start and complete the task. It does not allow to view the forms.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Then I thought let me get the task and claim it in code and do the rest in the JBPM console. I thought the Blocking calls</p><p>will help me do this. But this did not work either. Since the code was consecutive it successively claimed the respective</p><p>tasks for krisv and john. The blocking call did not wait for me complete the operation for krisv through the JBPM console.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I am using JBPM5.2. Eclipse Helios SR2, JBoss App Server 7 and I am using the Mina Task Server created by the ant script.</p><p>I have my main process when loads the knowledge base, creates the session, registers the human task handler and starts</p><p>the process. I have my mina client process which creates the Mina task client and does the processing of the tasks.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Your suggestions will be greatly appreciated.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/740082#740082">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>