<!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;">
jBPM for web
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/nt2005">nt2005</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/717282#717282">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hey Guys,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;">English:</span></p><p>I am working on a web page where a user can start his own processes.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I use an stateful (ScopeType.Session) bean (Seam 2.2.2).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>When the user open the site his ksession gets loaded:</p><pre class="jive-pre"><code class="jive-code jive-java">@Create
<font color="navy"><b>public</b></font> <font color="navy"><b>void</b></font> initSession() <font color="navy">{</font>
 
EntityManagerFactory emf = entityManager.getEntityManagerFactory();
....
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
....
ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(usersession.getSessionid(), kbase, null, env);    
    
<font color="navy">}</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Than the user starts a process. When the process needs more time for calculation, my bean is not responding to my jsf-page. Because the thread is in the methode of startProcess().</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>My question is now: How I can run a process but also can interact with my jsf-page?</p><p>What seam components/types would be better or should I add? (ScopeType.Application maybe?) Anyone any idea?</p><p>I am not very firm in Seam.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I hope you understand my questions.  If not, please ask! Thank you.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="text-decoration: underline;">Deutsch:</span></p><p>Ich arbeite an einer Webseite, in der Benutzer eigene Prozesse starten können.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Wenn ein Benutzer die Seite das erste Mal öffnet, wird seine eigene ksession geladen.</p><pre ___default_attr="java" class="jive_text_macro jive_macro_code"><p>@Create</p><p>public void initSession() {</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>EntityManagerFactory emf = entityManager.getEntityManagerFactory();</p><p>....</p><p>KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();</p><p>....</p><p>ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(usersession.getSessionid(), kbase, null, env);     </p><p>     </p><p>}</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Wenn ein Benutzer einen Prozess startet, der mehr Berechnungszeit braucht, antwortet logischerweise auch mein Bean nicht auf die Jsf-Anfragen meiner Seite. Da ja mein Bean zurzeit im startProcess() hängt.</p><p>Meine Frage ist nun, wie ich einen Prozess starten kann und mit den Bean dennoch normal weiter arbeiten kann.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Ich kenn mich mit Seam nicht wirklich gut aus aber muss ich da eventuell noch andere Seam Bean Komponenten mit einfügen (ScopeType.Application)?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Habt ihr eine Idee? Wenn noch fragen sind, bitte fragen.</p><p>Danke!</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/717282#717282">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>