I did see that I need to populate users, but I didn't at first seen any instructions on how to do so. Reading more carefully, I think I see how to do it now, i.e. by calling "addUser()". I'll give that a try a little later today. Another thing that may give me a problem is that I didn't know what the second argument should be to the TaskService() constructor below. The documentation shows only one argument, but it seems that there is no one argument constructor anymore. Any help with that? Really appreciate your help and time! -Chuck<br>
<br><pre>private static void startTaskService()<br>        {<br>                EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.drools.task");<br>                TaskService taskService = new TaskService(emf,null);<br>                MinaTaskServer server = new MinaTaskServer( taskService );<br>
                Thread thread = new Thread( server );<br>                thread.start();<br>        }<br></pre><br><br><div class="gmail_quote">On Mon, Jan 25, 2010 at 1:05 PM, salaboy [via Drools - Java Rules Engine] <span dir="ltr"><<a href="http://n3.nabble.com/user/SendEmail.jtp?type=node&node=138369&i=0" target="_top" rel="nofollow">[hidden email]</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
I see that problem before. It means that you need to populate some users first. Insert in the database an administrator user before running the process.<br><br></div><div class="gmail_quote"><div><div></div><div class="h5">
On Mon, Jan 25, 2010 at 3:28 PM, Chuck.KS <span dir="ltr"><<a href="http://n3.nabble.com/user/SendEmail.jtp?type=node&node=138346&i=0" rel="nofollow" target="_blank" link="external">[hidden email]</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5"><div><br>
<br>
ramram wrote:<br>
><br>
> Hi What do u have as a problem running the human task?<br>
> did u run the taskservice?<br>
> u cant start a humantask flow as long as u dont have a TaskService?<br>
><br>
<br>
</div>I did manage to put some code together but I didn't feel from reading the<br>
documentation that I knew exactly what I was doing. I think it would be very<br>
helpful and many questions would be avoided if a worked out example could<br>
be provided with the drools distribution. Anyway, I really appreciate your<br>
help. The error I got is indicated below.<br>
<br>
Jan 25, 2010 12:16:39 PM org.hibernate.util.JDBCExceptionReporter<br>
logExceptions<br>
WARNING: SQL Error: 23002, SQLState: 23002<br>
Jan 25, 2010 12:16:39 PM org.hibernate.util.JDBCExceptionReporter<br>
logExceptions<br>
SEVERE: Referential integrity constraint violation: FK27A9A59B680AE0:<br>
PUBLIC.TASK FOREIGN KEY(CREATEDBY_ID) REFERENCES<br>
PUBLIC.ORGANIZATIONALENTITY(ID) [23002-77]<br>
Jan 25, 2010 12:16:39 PM org.hibernate.util.JDBCExceptionReporter<br>
logExceptions<br>
WARNING: SQL Error: 23002, SQLState: 23002<br>
Jan 25, 2010 12:16:39 PM org.hibernate.util.JDBCExceptionReporter<br>
logExceptions<br>
SEVERE: Referential integrity constraint violation: FK27A9A59B680AE0:<br>
PUBLIC.TASK FOREIGN KEY(CREATEDBY_ID) REFERENCES<br>
PUBLIC.ORGANIZATIONALENTITY(ID) [23002-77]<br>
Jan 25, 2010 12:16:39 PM<br>
org.hibernate.event.def.AbstractFlushingEventListener performExecutions<br>
SEVERE: Could not synchronize database state with session<br>
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC<br>
batch update<br>
at<br>
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)<br>
at<br>
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)<br>
at<br>
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)<br>
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)<br>
<br>
Also, I'm attaching my test file and persistence.xml file:<br>
<a href="http://n3.nabble.com/file/n138317/RuleFlowTest.java" rel="nofollow" link="external" target="_blank">http://n3.nabble.com/file/n138317/RuleFlowTest.java</a> RuleFlowTest.java ,<br>
<a href="http://n3.nabble.com/file/n138317/persistence.xml" rel="nofollow" link="external" target="_blank">http://n3.nabble.com/file/n138317/persistence.xml</a> persistence.xml<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n3.nabble.com/Human-Task-Example-tp131011p138317.html" rel="nofollow" link="external" target="_blank">http://n3.nabble.com/Human-Task-Example-tp131011p138317.html</a><br>
</font></div></div><div><div></div><div><div><div></div><div class="h5">Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
</div></div><a href="http://n3.nabble.com/user/SendEmail.jtp?type=node&node=138346&i=1" rel="nofollow" target="_blank" link="external">[hidden email]</a><div class="im"><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></div></blockquote></div><br><br clear="all"><div class="im"><br>-- <br> - <a href="http://salaboy.wordpress.com" rel="nofollow" link="external" target="_blank">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar" rel="nofollow" link="external" target="_blank">http://www.jbug.com.ar</a><br>
- Salatino "Salaboy" Mauricio -<br>
<br></div>_______________________________________________
<br>rules-users mailing list
<br><a href="http://n3.nabble.com/user/SendEmail.jtp?type=node&node=138346&i=2" rel="nofollow" target="_blank" link="external">[hidden email]</a>
<br><div class="im"><a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" link="external" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>
<br><hr align="left" width="300">
View this message in context: <a href="http://n3.nabble.com/Human-Task-Example-tp131011p138369.html">Re: [rules-users] Human Task Example</a><br>
Sent from the <a href="http://n3.nabble.com/Drools-User-f47000.html">Drools - User mailing list archive</a> at Nabble.com.<br>