<!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;">
    Difficult workflow question
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/jbize">John Bize</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/727034#727034">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 am attempting to handle what to me is a difficult workflow problem.&#160; I believe a good metaphore for this process is: "Who's got the button?"&#160; There are multiple buttons with different descriptions.&#160; There are several working teams that may have the button, but it's possible that no one has it.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So, a user connects to our system and submits a form asking "who's got the button?"&#160; The form can describe the button by composition (plastic, bone, etc.), color, size, age, etc.&#160; (The user does his best to add enough detail.)&#160; Since there aren't too many buttons, sometimes just composition or age is sufficient for identification, but sometimes not.&#160; So, the request first goes to the user's supervisor (group) to validate that the request is valid and sufficient in detail (Human Task 1).&#160; The supervisor may reject the request for a number of reasons or approve it.&#160; If approved, an email is sent to all the teams (currently only 2) that might currently have the button.&#160; Here I split the workflow to two more human tasks.&#160; (I actually put these in an embedded sub-process.)&#160; For each of these team requests (human tasks), the response may be: "<strong>Not Me</strong>," "<strong>Need Additional Info </strong>(e.g. color)", or "<strong>Yes I have it</strong>."&#160; I recombined the workflow, but the answers are relevant to how the workflow procedes:&#160; If both answer "No," (happy path) the supervisor is notified, and the process completes.&#160; If neither answer "Yes," but at least one asks for additional information, the request is pushed back to the previous step.&#160; However, if one team answers "Yes," the process must complete and the other pending human task(s) must be cancelled (or completed) and the supervisor must be notified immediately and the process ends.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I hasven't even decided the best way to handle the "need more info" results. For right now, I need to know the correct way to cleanly end the other pending human tasks once one answers "yes."</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have tried quite a few different things such as events and errors, but nothing seems correct.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Any and all help is sincerely appreciated.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I'll resummarize the flow (code and image are not available):</p><ul><li style="text-align: start;">User submits request (start process)</li><li style="text-align: start;">Supervisor approves or rejects (HT-1) (followed by xor gateway for decision flow)</li><li style="text-align: start;">Diverge Gateway (AND)</li><li style="text-align: start;">Simultaneously ask Team 1 and 2 (HT-2 &amp; HT-3)</li><li style="text-align: start;">Converge Gateway (AND) if results are No or Need More Info</li><li style="text-align: start;"><strong>BUT if either HT response is Yes, <span style="color: #333333; text-decoration: underline;">other </span>HT is immediately ended (cancelled or stopped), and the process continues</strong></li><li style="text-align: start;">Supervisor receives notification for subsequent action (HT-4)</li></ul></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/727034#727034">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>