3 Replies Latest reply on Oct 11, 2005 3:28 AM by frederic dugrain

    End Owner task

    frederic dugrain Newbie

      How to save in DB that a task is end ?
      When I use taskInstance.end(), ProcessInstance continue but in DB the field end of the table JBPM_TASKINSTANCE is not fill. If I use the method setEnd(new Date()) is not fill.

        • 1. Re: End Owner task
          toto toto Newbie

          I checked in my DB and the field end is correctly filled.
          What's your process definition xml file?

          • 2. Re: End Owner task
            brittm Novice

            Be sure to commit! :-) jbpmSession.commitTransaction();

            • 3. Re: End Owner task
              frederic dugrain Newbie

              This is my process definition.xml

              <?xml version="1.0" encoding="UTF-8"?>
              
              <process-definition
               xmlns="http://jbpm.org/3/jpdl"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd"
               name="manual">
               <start-state name="start">
               <transition to="task1"></transition>
               </start-state>
               <task-node name="task1">
               <task name="change message">
               <assignment class="com.sample.action.ManualAssignmentHandler"/>
               </task>
               <transition name="tr1" to="node1"></transition>
              
               </task-node>
              
               <node name="node1">
               <action class="com.sample.action.GetMessage"></action>
               <transition name="tr1" to="end"></transition>
               </node>
              
               <end-state name="end"></end-state>
              </process-definition>



              In my java code I commit my jbpmSession:

              JbpmSession session = JbpmSession.getCurrentJbpmSession();
              session.beginTransaction();
              taskInstance.end();
              session.commitTransactionAndClose();