<!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;">
    Re: A few jbpm5 architectural/design questions
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/swiderski.maciej">Maciej Swiderski</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/732907#732907">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><blockquote class="jive-quote"><p>Kishore Jaladi wrote:</p><ul><li><span>We use MongoDB as our database. I understand that JBPM5 supports JPA persistence. Is it safe to assume that with any ORM provider like Dataneucleaus that provides a JPA layer for MongoDB can used for Work Flow Engine persistence? ref: </span><a class="jive-link-external-small" href="http://sasajovancic.blogspot.com/2011/06/use-jpa-with-mongodb-and-datanucleus.html" target="_blank">http://sasajovancic.blogspot.com/2011/06/use-jpa-with-mongodb-and-datanucleus.html</a></li></ul></blockquote><p>There is currently work in progress to ensure that jBPM will work with any JPA provider and hopefully will be released soon, so any help with testing that is more then welcome <span> :) </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>Kishore Jaladi wrote:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>Is it possible to do on-demand process-instance or ksession persistence? If so, is there any sample code?</li></ul></blockquote><p>You can control your transactions so I think you could achieve on demand persistence if I got you question right...</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>Kishore Jaladi wrote:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>I read that the work flow engine uses the single thread (the thread that starts the process/fires an event) to execute the entire process...no real multi-threading. What happens when the process instance and/or session is persisted at safe-points (or manually)?..does the thread end/return back to main program? </li></ul></blockquote><p>Yes, as soon as process goes into a state node (human task, timer, catch events) it will return the thread to main program.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>Kishore Jaladi wrote:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>If I have to start multiple (many) processes at the same time from the main program, do I have to start them all in different threads? do I have to model my own thread pool?</li></ul></blockquote><p>It all depends on your process design. If your process has a state node just after start event (such as human task) you could use single thread to start them but they will be started in sequence.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><blockquote class="jive-quote"><p>Kishore Jaladi wrote:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>I have a situation where, the main program receives a message on http and the http response thread have to be returned with status 200 OK after persisting the message. If I want the message persistence as a part of the process, how can I achieve this? I mean, I cannot return the main thread just after the first (persistence) node of the process, right?...how can make the rest of the process continue?</li></ul></blockquote><p>See above point regarding state nodes or just make you work async after start node using work item handlers - <a class="jive-link-external-small" href="http://docs.jboss.org/jbpm/v5.2/userguide/ch05.html#d0e1811">http://docs.jboss.org/jbpm/v5.2/userguide/ch05.html#d0e1811</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>HTH</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/732907#732907">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>