<!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;">
    User Task inside Multiple Instances node to do concurrent User Task assignments
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/aadav86">Aadav N</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/784851#784851">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Dear Community,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>With the support I've been receiving from the community members &amp; developers, I have involved myself into this wonderful phenomenon of exploring and making the best use of jBPM5 &amp; BPMN2.0</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>My current experiment is to combine User Task with Multiple Instances construct involving looping mechanism for an iterative execution. I'm good with generation of multiple task items (User task in my case) sequentially and its completion synchrounously and execution out of Multiple Instances construct is also fine.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/2-784851-20024/DynamicWF.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/2-784851-20024/450-133/DynamicWF.png </span></a> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>Objective </strong>of my above depicted design is to reduce a lot of manual effort in placing multiple user tasks to achieve a approval workflow of multi levels with more than an user task at every level. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>1) To serve the horizontal purpose I'm simply using Multiple Instances node to create concurrent user task assignments.</p><p>2) To carry out the vertical level I have manually introduced the looping mechanism.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>Concerns &amp; Queries </strong>about what I'm trying to achieve is</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>1) If at all I have placed separate User Tasks across the BPMN, associating the name of the tasks with User Task node would have become simple since I would have given the names separately. But in case of my design the User Task which takes the input with the help of Multiple Instances node's collection expression(list) it gets the User (Approver) name alone. I'm wondering how can I associate the name of the task with the User Task node. For Eg:- HR Approval, Admin Approval etc., If the multiple instances node is capable of taking Map object we could have set the Task Name as key and the User name as value.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>2) Is there any tweak available for Multiple Instances node with which we can set its property to "Async" because the construct behaves in a synchronized manner meaning only after all the Task assignments(User task in my case) are completed the construct moves forward its control. But there are situations in which I really need to keep the User Tasks triggered out of Multiple Instances be independent of each other.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p> 3) Is it possible to customize the User Task to associate it with an WorkItemHandler. This question should make sense if my understanding about the Domain specific WorkItemHandlers are not wrong.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p> Guys, please throw me some light on these things as I'm struct and not able to move forward with the other things..</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks in Advance,</p><p>Aadav</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/784851#784851">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>