<!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="http://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;">
    Not able to change state of human task, persistance
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/erikx">Erik X</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/644560#644560">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I am writing a unit test to learn about JBPM.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The idea develop an basic example of a human task, in combination with the mina server, backed by a H2 in-memory database. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The database schema is created successfully. Starting and connecting to the mina server seems to work fine. Fetching available tasks for a user works fine, too. A basic process example, based on script tasks, also works fine.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>However, claiming, starting and completing a human task does not change the status of the human task.</p><p>Interestingly, the name of the human task in question is NULL. Whereas the ID is set.</p><p>The script task just before the human task is reached automatically.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Please find the files below.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks</p><p>Erik</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h1><span style="font-size: 12pt;">persistance.xml (taken from current JBPM docs)</span></h1><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="jive-xml-tag"><span>&lt;persistence version="1.0"
&#160;&#160;&#160; xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><span>
&#160;&#160;&#160;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd</a><span>
&#160;&#160;&#160;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a><span>
&#160;&#160;&#160;&#160;&#160;&#160; </span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" target="_blank">http://java.sun.com/xml/ns/persistence/orm_1_0.xsd</a><span>"
&#160;&#160;&#160; xmlns:orm="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence/orm" target="_blank">http://java.sun.com/xml/ns/persistence/orm</a><span>" xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>" xmlns="</span><a class="jive-link-external-small" href="http://java.sun.com/xml/ns/persistence" target="_blank">http://java.sun.com/xml/ns/persistence</a><span>"&gt;</span></span>

&#160;&#160;&#160; <span class="jive-xml-tag">&lt;persistence-unit name="org.jbpm.task"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;provider&gt;</span>org.hibernate.ejb.HibernatePersistence<span class="jive-xml-tag">&lt;/provider&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Attachment<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Content<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.BooleanExpression<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Comment<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Deadline<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Comment<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Deadline<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Delegation<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Escalation<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Group<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.I18NText<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Notification<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.EmailNotification<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.EmailNotificationHeader<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.PeopleAssignments<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Reassignment<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Status<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.Task<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.TaskData<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.SubTasksStrategy<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.OnParentAbortAllSubTasksEndStrategy<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.OnAllSubTasksEndParentEndStrategy<span class="jive-xml-tag">&lt;/class&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;class&gt;</span>org.jbpm.task.User<span class="jive-xml-tag">&lt;/class&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;properties&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.driver_class" value="org.h2.Driver" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.url" value="jdbc:h2:mem:mydb" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.username" value="sa" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.password" value="sasa" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.connection.autocommit" value="false" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.max_fetch_depth" value="3" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.hbm2ddl.auto" value="create-drop" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;property name="hibernate.show_sql" value="true" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/properties&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/persistence-unit&gt;</span>
<span class="jive-xml-tag">&lt;/persistence&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h1><span style="font-size: 12pt;">HumanTask.bpmn</span></h1><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
<span class="jive-xml-tag"><span>&lt;definitions id="Definition" targetNamespace="</span><a class="jive-link-external-small" href="http://www.jboss.org/drools" target="_blank">http://www.jboss.org/drools</a><span>" typeLanguage="</span><a class="jive-link-external-small" href="http://www.java.com/javaTypes" target="_blank">http://www.java.com/javaTypes</a><span>"
&#160;&#160;&#160; expressionLanguage="</span><a class="jive-link-external-small" href="http://www.mvel.org/2.0" target="_blank">http://www.mvel.org/2.0</a><span>" xmlns="</span><a class="jive-link-external-small" href="http://www.omg.org/spec/BPMN/20100524/MODEL" target="_blank">http://www.omg.org/spec/BPMN/20100524/MODEL</a><span>" xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"
&#160;&#160;&#160; xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://www.omg.org/spec/BPMN/20100524/MODEL" target="_blank">http://www.omg.org/spec/BPMN/20100524/MODEL</a><span> BPMN20.xsd" xmlns:g="</span><a class="jive-link-external-small" href="http://www.jboss.org/drools/flow/gpd" target="_blank">http://www.jboss.org/drools/flow/gpd</a><span>"
&#160;&#160;&#160; xmlns:bpmndi="</span><a class="jive-link-external-small" href="http://www.omg.org/spec/BPMN/20100524/DI" target="_blank">http://www.omg.org/spec/BPMN/20100524/DI</a><span>" xmlns:dc="</span><a class="jive-link-external-small" href="http://www.omg.org/spec/DD/20100524/DC" target="_blank">http://www.omg.org/spec/DD/20100524/DC</a><span>" xmlns:di="</span><a class="jive-link-external-small" href="http://www.omg.org/spec/DD/20100524/DI" target="_blank">http://www.omg.org/spec/DD/20100524/DI</a><span>"
&#160;&#160;&#160; xmlns:tns="</span><a class="jive-link-external-small" href="http://www.jboss.org/drools" target="_blank">http://www.jboss.org/drools</a><span>"&gt;</span></span>

&#160;&#160;&#160; <span class="jive-xml-tag">&lt;process processType="Private" isExecutable="true" id="net.we.process.human.test" name="Basic Test Process"&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;startEvent id="start" name="Start" /&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag"><span>&lt;scriptTask id="print1" name="Before" scriptFormat="</span><a class="jive-link-external-small" href="http://www.java.com/java" target="_blank">http://www.java.com/java</a><span>"&gt;</span></span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;script&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println(<span class="jive-xml-quote">Before user task</span>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/script&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/scriptTask&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;userTask id="htask1" name="HumanTask1"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;potentialOwner&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;resourceAssignmentExpression&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;formalExpression&gt;</span>mina, anim<span class="jive-xml-tag">&lt;/formalExpression&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/resourceAssignmentExpression&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/potentialOwner&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/userTask&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag"><span>&lt;scriptTask id="print2" name="Before" scriptFormat="</span><a class="jive-link-external-small" href="http://www.java.com/java" target="_blank">http://www.java.com/java</a><span>"&gt;</span></span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;script&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println(<span class="jive-xml-quote">After user task</span>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/script&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/scriptTask&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;endEvent id="end" name="End"&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;terminateEventDefinition /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/endEvent&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;sequenceFlow id="start_print1" sourceRef="start" targetRef="print1" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;sequenceFlow id="print1_htask1" sourceRef="print1" targetRef="htask1" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;sequenceFlow id="htask1_print2" sourceRef="htask1" targetRef="print2" /&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;sequenceFlow id="print2_end" sourceRef="print2" targetRef="end" /&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/process&gt;</span>
<span class="jive-xml-tag">&lt;/definitions&gt;</span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 12pt;">Java</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java"><font color="navy"><b>package</b></font> net.bigpoint.cash.service.process;
&#160;
<font color="navy"><b>import</b></font> <font color="navy"><b>static</b></font> org.junit.Assert.*;
&#160;
<font color="navy"><b>import</b></font> java.io.ByteArrayInputStream;
<font color="navy"><b>import</b></font> java.io.ByteArrayOutputStream;
<font color="navy"><b>import</b></font> java.io.IOException;
<font color="navy"><b>import</b></font> java.io.ObjectInputStream;
<font color="navy"><b>import</b></font> java.io.ObjectOutputStream;
<font color="navy"><b>import</b></font> java.util.ArrayList;
<font color="navy"><b>import</b></font> java.util.HashMap;
<font color="navy"><b>import</b></font> java.util.List;
<font color="navy"><b>import</b></font> java.util.Map;
<font color="navy"><b>import</b></font> java.util.logging.Logger;
&#160;
<font color="navy"><b>import</b></font> javax.persistence.EntityManagerFactory;
<font color="navy"><b>import</b></font> javax.persistence.Persistence;
&#160;
<font color="navy"><b>import</b></font> org.drools.KnowledgeBase;
<font color="navy"><b>import</b></font> org.drools.KnowledgeBaseFactory;
<font color="navy"><b>import</b></font> org.drools.SystemEventListener;
<font color="navy"><b>import</b></font> org.drools.SystemEventListenerFactory;
<font color="navy"><b>import</b></font> org.drools.builder.KnowledgeBuilder;
<font color="navy"><b>import</b></font> org.drools.builder.KnowledgeBuilderFactory;
<font color="navy"><b>import</b></font> org.drools.builder.ResourceType;
<font color="navy"><b>import</b></font> org.drools.io.ResourceFactory;
<font color="navy"><b>import</b></font> org.drools.logger.KnowledgeRuntimeLogger;
<font color="navy"><b>import</b></font> org.drools.logger.KnowledgeRuntimeLoggerFactory;
<font color="navy"><b>import</b></font> org.drools.runtime.Environment;
<font color="navy"><b>import</b></font> org.drools.runtime.EnvironmentName;
<font color="navy"><b>import</b></font> org.drools.runtime.StatefulKnowledgeSession;
<font color="darkgreen">//import org.jbpm.examples.humantask.HumanTaskExample.SystemEventListener;</font>
<font color="navy"><b>import</b></font> org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler;
<font color="navy"><b>import</b></font> org.jbpm.process.workitem.wsht.WSHumanTaskHandler;
<font color="navy"><b>import</b></font> org.jbpm.task.AccessType;
<font color="navy"><b>import</b></font> org.jbpm.task.Content;
<font color="navy"><b>import</b></font> org.jbpm.task.Task;
<font color="navy"><b>import</b></font> org.jbpm.task.User;
<font color="navy"><b>import</b></font> org.jbpm.task.query.TaskSummary;
<font color="navy"><b>import</b></font> org.jbpm.task.service.ContentData;
<font color="navy"><b>import</b></font> org.jbpm.task.service.TaskClient;
<font color="navy"><b>import</b></font> org.jbpm.task.service.TaskService;
<font color="navy"><b>import</b></font> org.jbpm.task.service.TaskServiceSession;
<font color="navy"><b>import</b></font> org.jbpm.task.service.mina.MinaTaskClientConnector;
<font color="navy"><b>import</b></font> org.jbpm.task.service.mina.MinaTaskClientHandler;
<font color="navy"><b>import</b></font> org.jbpm.task.service.mina.MinaTaskServer;
<font color="navy"><b>import</b></font> org.jbpm.task.service.responsehandlers.BlockingGetContentResponseHandler;
<font color="navy"><b>import</b></font> org.jbpm.task.service.responsehandlers.BlockingGetTaskResponseHandler;
<font color="navy"><b>import</b></font> org.jbpm.task.service.responsehandlers.BlockingTaskOperationResponseHandler;
<font color="navy"><b>import</b></font> org.jbpm.task.service.responsehandlers.BlockingTaskSummaryResponseHandler;
<font color="navy"><b>import</b></font> org.junit.Before;
<font color="navy"><b>import</b></font> org.junit.Test;
&#160;
<font color="navy"><b>public</b></font> <font color="navy"><b>class</b></font> HumanTaskExampleTest <font color="navy">{</font>
&#160;
&#160;&#160;&#160; <font color="navy"><b>private</b></font> Logger logger = Logger.getLogger(this.getClass().toString());
&#160;
&#160;&#160;&#160; @Before
&#160;&#160;&#160; <font color="navy"><b>public</b></font> <font color="navy"><b>void</b></font> testSetup() <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>try</b></font> <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; EntityManagerFactory emf = Persistence.createEntityManagerFactory(<font color="red">"org.jbpm.task"</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TaskService taskService = <font color="navy"><b>new</b></font> TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; TaskServiceSession taskSession = taskService.createSession();
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; taskSession.addUser(<font color="navy"><b>new</b></font> User(<font color="red">"Administrator"</font>));
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; taskSession.addUser(<font color="navy"><b>new</b></font> User(<font color="red">"mina"</font>));
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; taskSession.addUser(<font color="navy"><b>new</b></font> User(<font color="red">"anim"</font>));
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; MinaTaskServer server = <font color="navy"><b>new</b></font> MinaTaskServer(taskService);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Thread thread = <font color="navy"><b>new</b></font> Thread(server);
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; thread.start();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font> <font color="navy"><b>catch</b></font> (Throwable t) <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; t.printStackTrace();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy">}</font>
&#160;&#160;&#160; <font color="navy">}</font>
&#160;
&#160;&#160;&#160; @Test
&#160;&#160;&#160; <font color="navy"><b>public</b></font> <font color="navy"><b>void</b></font> testHumanTask() <font color="navy"><b>throws</b></font> Exception <font color="navy">{</font>
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; KnowledgeBase kbase = readKnowledgeBase();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; WSHumanTaskHandler handler = <font color="navy"><b>new</b></font> WSHumanTaskHandler();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">// CommandBasedWSHumanTaskHandler handler = new</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">// CommandBasedWSHumanTaskHandler(ksession);</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; ksession.getWorkItemManager().registerWorkItemHandler(<font color="red">"Human Task"</font>, handler);
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; KnowledgeRuntimeLogger log = KnowledgeRuntimeLoggerFactory.newThreadedFileLogger(ksession, <font color="red">"test"</font>, 1000);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; ksession.startProcess(<font color="red">"net.we.process.human.test"</font>);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="darkgreen">// ksession.fireAllRules();</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; log.close();
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; TaskClient client = <font color="navy"><b>new</b></font> TaskClient(<font color="navy"><b>new</b></font> MinaTaskClientConnector(<font color="red">"client 1"</font>, <font color="navy"><b>new</b></font> MinaTaskClientHandler(
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; SystemEventListenerFactory.getSystemEventListener())));
&#160;&#160;&#160;&#160;&#160;&#160;&#160; client.connect(<font color="red">"127.0.0.1"</font>, 9123);
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; BlockingTaskSummaryResponseHandler taskSummaryResponseHandler = <font color="navy"><b>new</b></font> BlockingTaskSummaryResponseHandler();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; client.getTasksAssignedAsPotentialOwner(<font color="red">"mina"</font>, <font color="red">"en-UK"</font>, taskSummaryResponseHandler);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; List&lt;TaskSummary&gt; tasks = taskSummaryResponseHandler.getResults();
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; TaskSummary task = tasks.get(0);
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; logger.info(task.getId() + <font color="red">", name="</font> +task.getName()+ <font color="red">", actualOwner="</font> + task.getActualOwner() + <font color="red">", status="</font> + task.getStatus());
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; BlockingTaskOperationResponseHandler responseHandler = <font color="navy"><b>new</b></font> BlockingTaskOperationResponseHandler();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; client.claim(task.getId(), <font color="red">"mina"</font>, responseHandler);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; responseHandler.waitTillDone(10000);
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; logger.info(task.getId() + <font color="red">", name="</font> +task.getName()+ <font color="red">", actualOwner="</font> + task.getActualOwner() + <font color="red">", status="</font> + task.getStatus());
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; responseHandler = <font color="navy"><b>new</b></font> BlockingTaskOperationResponseHandler();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; client.start(task.getId(), <font color="red">"mina"</font>, responseHandler);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; responseHandler.waitTillDone(10000);
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; logger.info(task.getId() + <font color="red">", name="</font> +task.getName()+ <font color="red">", actualOwner="</font> + task.getActualOwner() + <font color="red">", status="</font> + task.getStatus());
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; responseHandler = <font color="navy"><b>new</b></font> BlockingTaskOperationResponseHandler();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; client.complete(task.getId(), <font color="red">"mina"</font>, null, responseHandler);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; responseHandler.waitTillDone(10000);
&#160;
&#160;&#160;&#160;&#160;&#160;&#160;&#160; logger.info(task.getId() + <font color="red">", name="</font> +task.getName()+ <font color="red">", actualOwner="</font> + task.getActualOwner() + <font color="red">", status="</font> + task.getStatus());
&#160;&#160;&#160; <font color="navy">}</font>
&#160;
&#160;&#160;&#160; <font color="navy"><b>private</b></font> <font color="navy"><b>static</b></font> KnowledgeBase readKnowledgeBase() <font color="navy"><b>throws</b></font> Exception <font color="navy">{</font>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
&#160;&#160;&#160;&#160;&#160;&#160;&#160; kbuilder.add(ResourceFactory.newClassPathResource(<font color="red">"humantask/HumanTask.bpmn"</font>), ResourceType.BPMN2);
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="navy"><b>return</b></font> kbuilder.newKnowledgeBase();
&#160;&#160;&#160; <font color="navy">}</font>
<font color="navy">}</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="font-size: 12pt;">Output</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code">0
INFO&#160; org.hibernate.cfg.annotations.Version&#160; - Hibernate Annotations 3.4.0.GA

13&#160;&#160; INFO&#160; org.hibernate.cfg.Environment&#160; - Hibernate 3.3.0.SP1
17&#160;&#160; INFO&#160; org.hibernate.cfg.Environment&#160; - hibernate.properties not found
19&#160;&#160; INFO&#160; org.hibernate.cfg.Environment&#160; - Bytecode provider name : javassist
23&#160;&#160; INFO&#160; org.hibernate.cfg.Environment&#160; - using JDK 1.4 java.sql.Timestamp handling
76&#160;&#160; INFO&#160; org.hibernate.annotations.common.Version&#160; - Hibernate Commons Annotations 3.1.0.GA
79&#160;&#160; INFO&#160; org.hibernate.ejb.Version&#160; - Hibernate EntityManager 3.4.0.GA
1631 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: TasksAssignedAsBusinessAdministrator =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.taskData.createdBy left join t.subjects as subject left join t.descriptions as description left join t.names as name, OrganizationalEntity businessAdministrator where businessAdministrator.id = :userId and businessAdministrator in elements ( t.peopleAssignments.businessAdministrators ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.expirationTime is null
1631 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: TasksAssignedAsExcludedOwner =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.taskData.createdBy left join t.subjects as subject left join t.descriptions as description left join t.names as name, OrganizationalEntity excludedOwners where excludedOwners.id = :userId and excludedOwners in elements ( t.peopleAssignments.excludedOwners ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.expirationTime is null
1632 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: TasksAssignedAsPotentialOwner =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.taskData.createdBy left join t.taskData.actualOwner left join t.subjects as subject left join t.descriptions as description left join t.names as name, OrganizationalEntity potentialOwners where potentialOwners.id = :userId and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and t.taskData.expirationTime is null
1632 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: TasksAssignedAsPotentialOwnerWithGroups =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.taskData.createdBy left join t.taskData.actualOwner left join t.subjects as subject left join t.descriptions as description left join t.names as name, OrganizationalEntity potentialOwners where ( potentialOwners.id = :userId or potentialOwners.id in (:groupIds) ) and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and t.taskData.expirationTime is null
1632 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: TasksAssignedAsPotentialOwnerByGroup =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.taskData.createdBy left join t.taskData.actualOwner left join t.subjects as subject left join t.descriptions as description left join t.names as name, OrganizationalEntity potentialOwners where potentialOwners.id = :groupId and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and t.taskData.expirationTime is null
1632 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: SubTasksAssignedAsPotentialOwner =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.taskData.createdBy left join t.taskData.actualOwner left join t.subjects as subject left join t.descriptions as description left join t.names as name, OrganizationalEntity potentialOwners where t.taskData.parentId = :parentId and potentialOwners.id = :userId and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and t.taskData.expirationTime is null
1632 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: GetSubTasksByParentTaskId =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.subjects as subject left join t.descriptions as description left join t.names as name where t.taskData.parentId = :parentId and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and t.taskData.expirationTime is null
1632 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: TasksAssignedAsRecipient =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.taskData.createdBy left join t.subjects as subject left join t.descriptions as description left join t.names as name, OrganizationalEntity recipients where recipients.id = :userId and recipients in elements ( t.peopleAssignments.recipients ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.expirationTime is null
1632 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: TasksAssignedAsTaskInitiator =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.taskData.createdBy left join t.subjects as subject left join t.descriptions as description left join t.names as name, OrganizationalEntity taskInitiator where taskInitiator.id = :userId and taskInitiator = t.peopleAssignments.taskInitiator and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.expirationTime is null
1632 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: TasksAssignedAsTaskStakeholder =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.taskData.createdBy left join t.subjects as subject left join t.descriptions as description left join t.names as name, OrganizationalEntity taskStakeholder where taskStakeholder.id = :userId and taskStakeholder in elements ( t.peopleAssignments.taskStakeholders ) and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.expirationTime is null
1632 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: TasksOwned =&gt; select new org.jbpm.task.query.TaskSummary( t.id, t.taskData.processInstanceId, name.text, subject.text, description.text, t.taskData.status, t.priority, t.taskData.skipable, t.taskData.actualOwner, t.taskData.createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime) from Task t left join t.taskData.createdBy left join t.subjects as subject left join t.descriptions as description left join t.names as name where t.taskData.actualOwner.id = :userId and ( name.language = :language or t.names.size = 0 ) and ( subject.language = :language or t.subjects.size = 0 ) and ( description.language = :language or t.descriptions.size = 0 ) and t.taskData.expirationTime is null
1633 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: UnescalatedDeadlines =&gt; select new org.jbpm.task.query.DeadlineSummary( t.id, d.id, d.date) from Task t, Deadline d where (d in elements( t.deadlines.startDeadlines ) or d in elements( t.deadlines.endDeadlines ) ) and d.escalated = false order by d.date
1633 INFO&#160; org.hibernate.cfg.annotations.QueryBinder&#160; - Binding Named query: TaskByWorkItemId =&gt; select t from Task t where t.taskData.workItemId = :workItemId
1636 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.Attachment
1660 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.Attachment on table Attachment
1700 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.Content
1700 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.Content on table Content
1706 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.BooleanExpression
1706 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.BooleanExpression on table BooleanExpression
1707 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.Comment
1708 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.Comment on table task_comment
1709 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.Deadline
1709 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.Deadline on table Deadline
1736 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.Escalation
1737 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.Escalation on table Escalation
1740 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.OrganizationalEntity
1740 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.OrganizationalEntity on table OrganizationalEntity
1779 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.Group
1793 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.I18NText
1793 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.I18NText on table I18NText
1794 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.Notification
1794 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.Notification on table Notification
1803 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.EmailNotification
1808 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.EmailNotificationHeader
1808 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.EmailNotificationHeader on table email_header
1810 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.Reassignment
1810 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.Reassignment on table Reassignment
1813 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.Task
1813 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.Task on table Task
1833 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.SubTasksStrategy
1833 INFO&#160; org.hibernate.cfg.annotations.EntityBinder&#160; - Bind entity org.jbpm.task.SubTasksStrategy on table SubTasksStrategy
1835 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.OnParentAbortAllSubTasksEndStrategy
1836 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.OnAllSubTasksEndParentEndStrategy
1836 INFO&#160; org.hibernate.cfg.AnnotationBinder&#160; - Binding entity from annotated class: org.jbpm.task.User
1841 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Task.taskData.comments -&gt; task_comment
1843 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Task.taskData.attachments -&gt; Attachment
1843 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Task.subjects -&gt; I18NText
1843 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Task.subTaskStrategies -&gt; SubTasksStrategy
1843 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Task.names -&gt; I18NText
1844 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Task.descriptions -&gt; I18NText
1844 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Task.deadlines.startDeadlines -&gt; Deadline
1844 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Task.deadlines.endDeadlines -&gt; Deadline
1844 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Reassignment.documentation -&gt; I18NText
1847 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Notification.subjects -&gt; I18NText
1848 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Notification.names -&gt; I18NText
1848 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Notification.documentation -&gt; I18NText
1848 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Notification.descriptions -&gt; I18NText
1848 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Escalation.reassignments -&gt; Reassignment
1848 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Escalation.notifications -&gt; Notification
1848 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Escalation.constraints -&gt; BooleanExpression
1848 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Deadline.escalations -&gt; Escalation
1848 INFO&#160; org.hibernate.cfg.annotations.CollectionBinder&#160; - Mapping collection: org.jbpm.task.Deadline.documentation -&gt; I18NText
1850 INFO&#160; org.hibernate.cfg.AnnotationConfiguration&#160; - Hibernate Validator not found: ignoring
1872 WARN&#160; org.hibernate.ejb.Ejb3Configuration&#160; - hibernate.connection.autocommit = false break the EJB3 specification
1878 INFO&#160; org.hibernate.cfg.search.HibernateSearchEventListenerRegister&#160; - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
1912 INFO&#160; org.hibernate.connection.DriverManagerConnectionProvider&#160; - Using Hibernate built-in connection pool (not for production use!)
1912 INFO&#160; org.hibernate.connection.DriverManagerConnectionProvider&#160; - Hibernate connection pool size: 20
1912 INFO&#160; org.hibernate.connection.DriverManagerConnectionProvider&#160; - autocommit mode: false
1916 INFO&#160; org.hibernate.connection.DriverManagerConnectionProvider&#160; - using driver: org.h2.Driver at URL: jdbc:h2:mem:mydb
1916 INFO&#160; org.hibernate.connection.DriverManagerConnectionProvider&#160; - connection properties: {user=sa, password=****, autocommit=false, release_mode=auto}
2079 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - RDBMS: H2, version: 1.3.162 (2011-11-26)
2079 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - JDBC driver: H2 JDBC Driver, version: 1.3.162 (2011-11-26)
2090 INFO&#160; org.hibernate.dialect.Dialect&#160; - Using dialect: org.hibernate.dialect.H2Dialect
2093 INFO&#160; org.hibernate.transaction.TransactionFactoryFactory&#160; - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
2095 INFO&#160; org.hibernate.transaction.TransactionManagerLookupFactory&#160; - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
2095 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Automatic flush during beforeCompletion(): disabled
2095 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Automatic session close at end of transaction: disabled
2095 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - JDBC batch size: 15
2095 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - JDBC batch updates for versioned data: disabled
2095 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Scrollable result sets: enabled
2095 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - JDBC3 getGeneratedKeys(): enabled
2095 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Connection release mode: auto
2096 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Maximum outer join fetch depth: 3
2096 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Default batch fetch size: 1
2096 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Generate SQL with comments: disabled
2096 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Order SQL updates by primary key: disabled
2096 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Order SQL inserts for batching: disabled
2096 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2098 INFO&#160; org.hibernate.hql.ast.ASTQueryTranslatorFactory&#160; - Using ASTQueryTranslatorFactory
2098 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Query language substitutions: {}
2098 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - JPA-QL strict compliance: enabled
2098 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Second-level cache: enabled
2098 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Query cache: disabled
2098 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
2098 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Optimize cache for minimal puts: disabled
2098 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Structured second-level cache entries: disabled
2103 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Statistics: disabled
2103 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Deleted entity synthetic identifier rollback: disabled
2103 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Default entity-mode: pojo
2103 INFO&#160; org.hibernate.cfg.SettingsFactory&#160; - Named query checking : enabled
2138 INFO&#160; org.hibernate.impl.SessionFactoryImpl&#160; - building session factory
2315 INFO&#160; org.hibernate.impl.SessionFactoryObjectFactory&#160; - Not binding factory to JNDI, no JNDI name configured
2326 INFO&#160; org.hibernate.tool.hbm2ddl.SchemaExport&#160; - Running hbm2ddl schema export
2326 INFO&#160; org.hibernate.tool.hbm2ddl.SchemaExport&#160; - exporting generated schema to database
2424 INFO&#160; org.hibernate.tool.hbm2ddl.SchemaExport&#160; - schema export complete
Before user task
4546 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - CREATED
4547 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - OPENED
4557 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - RECEIVED: HeapBuffer[pos=0 lim=675 cap=2048: 00 00 01 4F AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4571 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - RECEIVED: HeapBuffer[pos=0 lim=835 cap=2048: 00 00 01 4D AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4610 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=212 cap=256: 00 00 00 D0 AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4610 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
4674 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - CREATED
4674 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - OPENED
4677 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - RECEIVED: HeapBuffer[pos=0 lim=196 cap=2048: 00 00 00 C0 AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4689 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=288 cap=512: 00 00 01 1C AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4689 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
04.01.2012 11:25:51 net.bigpoint.cash.service.process.HumanTaskExampleTest testHumanTask
INFO: 1, name=null, actualOwner=null, status=Ready
4696 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - RECEIVED: HeapBuffer[pos=0 lim=270 cap=2048: 00 00 01 0A AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4720 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=165 cap=256: 00 00 00 A1 AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4720 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
04.01.2012 11:25:51 net.bigpoint.cash.service.process.HumanTaskExampleTest testHumanTask
INFO: 1, name=null, actualOwner=null, status=Ready
4721 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - RECEIVED: HeapBuffer[pos=0 lim=270 cap=1024: 00 00 01 0A AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4724 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=165 cap=256: 00 00 00 A1 AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4724 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
04.01.2012 11:25:51 net.bigpoint.cash.service.process.HumanTaskExampleTest testHumanTask
INFO: 1, name=null, actualOwner=null, status=Ready
4725 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - RECEIVED: HeapBuffer[pos=0 lim=275 cap=1024: 00 00 01 0F AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4729 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=367 cap=512: 00 00 01 6B AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4730 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
4732 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=165 cap=256: 00 00 00 A1 AC ED 00 05 73 72 01 00 1D 6F 72 67...]
4732 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - SENT: HeapBuffer[pos=0 lim=0 cap=0: empty]
4732 INFO&#160; org.apache.mina.filter.logging.LoggingFilter&#160; - RECEIVED: HeapBuffer[pos=0 lim=211 cap=1024: 00 00 00 CF AC ED 00 05 73 72 01 00 1D 6F 72 67...]
04.01.2012 11:25:51 net.bigpoint.cash.service.process.HumanTaskExampleTest testHumanTask
INFO: 1, name=null, actualOwner=null, status=Ready


</code></pre></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/644560#644560">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://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>