<!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;">
    Proposed temporary and limited approach to supporting excluded owners
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/jemmerling">jemmerling</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/646719#646719">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p><span style="font-size: 12pt;"><p><span>&#160; <p>I have been looking at way to do the following within jBPM:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Have a node in a process definition be associated with a particular group (or groups), however due to the history of a given process, to exclude some actor(s) who might be members of that group.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Now the WS-HumanTask specification supports something called excluded owners. Here is a snippet from one version of this specification (not certain if it is the latest one):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p></span></p><p><em>"Potential owners of a task are persons who receive the task so that they can claim and complete it. A potential owner becomes the actual owner of a task by explicitly claiming it. Before the task has been claimed, potential owners can influence the progress of the task, for example by changing the priority of the task, adding ad-hoc attachments or comments. All excluded owners are implicitly removed from the set of potential owners. A WS-HumanTask Definition MAY define assignment for this generic human role.</em></p><p><p><em>Excluded owners are are people who cannot become an actual or potential owner and thus they cannot reserve or start the task. A WS-HumanTask Definition MAY define assignment for this generic human role. "</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Although the jBPM5 schema supports the existence of excluded owners, I have seen no explicit mechanism to support this when developing an application. If there is something I am missing, please point this out.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>In the meantime, I can see a way that a developer could add this functionality without the need to directly modify jBPM5, using the following approach. I would like to know whether it is believed this would work. I am not completely comfortable with this for reasons I will give (although these reasons should be more or less obvious):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>1.) First, define a new work item parameter (or analogous mechanism) that represents users who will be excluded from the next node. Let's assume we can correctly identify the next node.</p></p><p>2.) Create a class that extends WSHumanTaskHandler. This class will override the <span style="font-family: courier new,courier;">executeWorkItem </span>method. This method will populate excluded owners in the people assignments from having inspected the new parameter. It will otherwise be the same as the method it overrides except for this one additional logic step.</p><p>3.) Replace the existing Taskorm.xml with a modified version in which the <span style="font-family: courier new,courier;">TasksAssignedAsPotentialOwnerByGroup </span>named query (and possibly some similar named queries) is modified so that excluded owners are not able to claim the task.</p><p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p></p><p>I believe all the above is feasible because a.) there is nothing to stop the developer from extending WSHumanTaskHandler in the described manner, and using it in the application code and b.) the ORM file is specified in persistence.xml which is a developer-configurable file, so the developer should be at liberty to specify a different file. So all this could be done without "hacking" jBPM directly.</p><p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>However I am uncomfortable with this approach because the overridden executeWorkItem method as well as the replacement ORM file would be created using a copy-and-paste methodology so that when progressing to a later version of jBPM it would be necessary to modify these to reflect the original logic.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Nevertheless, if there is some intention to support this type of functionality in a future release of jBPM (and assuming I am right to conclude it is not currently supported) this might be a justifiable short-term solution.</p></p></span></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/646719#646719">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>