<!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 5.3 not complete the task
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/betoflint">Jonathan Albornoz</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/775433#775433">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>hi! i have a problem and i want to know if any of you can tell me what to do!</p><p>thanks!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Enviroment:</p><p>-Windows 7 x64</p><p>-jBPM 5.3 Final Release</p><p>-Jboss 7.1.1</p><p>-H2 Database</p><p>-Web application in java</p><p>-Jdk&#160; 1.6</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The application is about the insert of many request of the people&#8230;this activate a workflow&#8230;.just instance when the request is inserted&#8230;</p><p>Then a person associated with a group has the responsibility to accept the request that in the workflow means that the process is started&#8230;then completed&#8230;</p><p>The problem is that when I insterted an instance of a process&#8230; (ksession.startProcess("com.sample.humantask", params) this is saved in h2 in the task table and then I close the connection&#8230;when I want complete this task&#8230;i make the connection again&#8230;complete my task&#8230;but don&rsquo;t start automaticly the next node of my process&#8230;I imagine that this happen because I put ksession.dispose after the instance of my process&#8230;.</p><p>How I can save my ksession and the use it to my propose&#8230;.i will put the code that I use&#8230;and sorry for my English&#8230;is not native! Thanks&#8230;..</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is part of the method that I use to instance my process&#8230;.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black; background: silver;">Map</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&lt;String, Object&gt; parametros = </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">new</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> HashMap&lt;String, Object&gt;();</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="font-size: 7.0pt; font-family: Consolas; color: black;">Proceso procMotorWF = </span><strong style="color: #7f0055; font-size: 7.0pt; font-family: Consolas;">new</strong><span style="font-size: 7.0pt; font-family: Consolas; color: black;"> Proceso();&#160; </span></p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; procMotorWF.crearConexion();//create the connection</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; parametros = procMotorWF.definirSolicitud(usuario_solicitud);</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">procMotorWF.instanciarProceso(parametros);</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> List&lt;String&gt; grupo = </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">new</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> ArrayList&lt;String&gt;();</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> grupo.add(</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #2a00ff;">"sales"</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">);</span></p><p style="margin-bottom: 0.0001pt;"> <span style="font-size: 7.0pt; font-family: Consolas; color: black;">List&lt;TaskSummary&gt; listaTareas = procMotorWF.obtenerPosibles(usuario, grupo);</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">Object object = listaTareas.get(listaTareas.size()-1);</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TaskSummary ultimaInstancia = (TaskSummary)object;</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Integer idProceso = </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">new</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> Integer((</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">int</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">)ultimaInstancia.getId());&#160; </span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="font-size: 7.0pt; font-family: Consolas; color: #3f7f5f;">//System.out.println("<span style="text-decoration: underline;">La</span> <span style="text-decoration: underline;">ultima</span> <span style="text-decoration: underline;">instancia</span> <span style="text-decoration: underline;">generada</span> <span style="text-decoration: underline;">contiene</span> el id"+ultimaInstancia.getId());</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p style="margin-bottom: 0.0001pt;"><span style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; procMotorWF.cerrarConexion();</span></p><p><span style="font-size: 10.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span lang="EN-US" style="font-size: 10.0pt; font-family: Consolas; color: black;">There is the open and close connection</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="margin-bottom: 0.0001pt;"><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">public</span></strong> <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">void</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> crearConexion(){ //open connection</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">if</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> (</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">kbase</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> == </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">){</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">try</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> {</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">kbase</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> = <em>readKnowledgeBase</em>();</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">catch</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> (Exception e) {</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #3f7f5f;">// </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f9fbf;">TODO</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #3f7f5f;"> Auto-generated catch block</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; e.printStackTrace();</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">if</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> (</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">ksession</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">==</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">){</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">ksession</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> = </span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">kbase</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">.newStatefulKnowledgeSession();</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">if</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> (</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">logger</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">==</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> &amp;&amp; </span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">ksession</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">!=</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">){</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">logger</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> = KnowledgeRuntimeLoggerFactory.<em>newThreadedFileLogger</em>(</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">ksession</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">, </span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #2a00ff;">"test"</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">, 1000);</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">if</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">(</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">hornetQHTWorkItemHandler</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">==</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> &amp;&amp; </span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">ksession</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">!=</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">){</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">hornetQHTWorkItemHandler</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> = </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">new</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> HornetQHTWorkItemHandler(</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">ksession</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">);&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">if</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">(</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">ksession</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">!=</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">){</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">ksession</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">.getWorkItemManager().registerWorkItemHandler(</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #2a00ff;">"Human Task"</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">, </span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">hornetQHTWorkItemHandler</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">);&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">if</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">(</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">taskClient</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">==</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">){</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">taskClient</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> = </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">new</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> SyncTaskServiceWrapper(</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">new</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> AsyncHornetQTaskClient(</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #2a00ff;">"HumanTaskExample-testClient"</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">));</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">taskClient</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">.connect(</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #2a00ff;">"127.0.0.1"</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">, 5445);</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SystemEventListenerFactory.<em>setSystemEventListener</em>(</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">new</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> SystemEventListener());</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">public</span></strong> <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">void</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> cerrarConexion(){ //close connection</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">try</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> {</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">taskClient</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">.disconnect();</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">hornetQHTWorkItemHandler</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">.dispose();</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">catch</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> (Exception e) {</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #3f7f5f;">// </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f9fbf;">TODO</span></strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #3f7f5f;"> Auto-generated catch block</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; e.printStackTrace();</span></p><p style="margin-bottom: 0.0001pt;"><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">ksession</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">.dispose();</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">logger</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">.close();</span></p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">taskClient</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> = </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong>;</p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">hornetQHTWorkItemHandler</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> = </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong>;</p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">ksession</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">=</span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong>;</p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #0000c0;">logger</span><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;"> = </span><strong><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: #7f0055;">null</span></strong>;</p><p style="margin-bottom: 0.0001pt;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="font-size: 7.0pt; font-family: Consolas; color: black;">}</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">Any idea what i have to do in this case&#8230;????</span></p><p><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Very thanks to all of you!! Nad again sorry for my English&#8230;.</span></p><p><span lang="EN-US" style="font-size: 7.0pt; font-family: Consolas; color: black;">If you need mor information&#8230;just tell me!</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/775433#775433">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>