0 Replies Latest reply on Mar 18, 2008 8:21 AM by sergio soria olivares

    org.jbpm.JbpmException: this token is locked by token[0]

    sergio soria olivares Newbie

      Hello, when I trying to end a signally task (By default all task are signally), the system crash and trhouws the exception
      "
      org.jbpm.JbpmException: this token is locked by token[0]
      "

      Can Anybody help me?

      I add too muy source code, the processdefinition.xml and the ActionHandler:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition xmlns="" name="logicaPedidos">
      
      
       <swimlane name="comprador">
       <assignment actor-id="comprador"></assignment>
       </swimlane>
      
       <swimlane name="shipper">
       <assignment actor-id="shipper"></assignment>
       </swimlane>
      
      
       <start-state name="Quincena de Pedidos">
       <transition to="Recepción del fichero PEDAM3"></transition>
       </start-state>
      
      
       <task-node name="Recepción del fichero PEDAM3">
       <task name="Introducir datos" swimlane="comprador">
       <description>
       Recibir e introducir los datos en el flujo para que el resto de aplicaciones procedan a procesarlos y tratarlos
       </description>
       <event type="task-start">
       <action name="IntroducirDatosStart" class="dom.Pedidos.jbpm.tareas.action.TareaIntroducirDatosActionHandler"></action>
       </event>
       </task>
       <event type="task-assign">
       <action name="tareaRecepcionAsignada" class="dom.Pedidos.jbpm.action.RecepcionPedam3ActionHandler"></action>
       </event>
       <transition to="Depuración automática para aceptar o Rechazar" name="a depuracion"></transition>
       </task-node>
      
       <task-node name="Depuración automática para aceptar o Rechazar">
       <event type="node-enter">
      
       <action name="Despues" class="dom.Pedidos.jbpm.action.DepuracionAutomaticaActionHandler"></action>
       </event>
       <transition to="Proceso Manual para aceptar o rechazar"></transition>
       </task-node>
      
       <task-node name="Proceso Manual para aceptar o rechazar">
       <transition to="Cierre de la quincena"></transition>
       </task-node>
      
       <task-node name="Cierre de la quincena">
       <task name="enviar a Madrid" swimlane="shipper">
       <description>
       Enviar los pedidos que no hayan pasado las reglas a Madrid
       </description>
       <event type="task-assign">
       <action name="EnviarMadrid" class="dom.Pedidos.jbpm.action.EnviarMadridActionHandler"></action>
       </event>
       </task>
       <task name="Aceptar pedidos" swimlane="shipper">
       <description>
       Aceptar los pedidos que hayan cumplido todas las reglas
       </description>
       <event type="task-assign">
       <action name="Creando la tarea" class="dom.Pedidos.jbpm.action.AceptarPedidosActionHandler"></action>
       </event>
       </task>
       <event type="node-enter">
       <action name="EntraCierreQuincena" class="dom.Pedidos.jbpm.action.CierreQuincenaActionHandler"></action>
       </event>
       <transition to="Pedidos"></transition>
       </task-node>
      
      
       <end-state name="Pedidos"></end-state>
      
      
      </process-definition>
      



      ActionHandler:

      package dom.Pedidos.jbpm.action;
      
      import java.util.Collection;
      import java.util.Iterator;
      
      import org.apache.log4j.Logger;
      import org.jbpm.graph.def.ActionHandler;
      import org.jbpm.graph.exe.ExecutionContext;
      import org.jbpm.taskmgmt.exe.TaskInstance;
      import org.jbpm.taskmgmt.exe.TaskMgmtInstance;
      
      public class EnviarMadridActionHandler implements ActionHandler
      {
       Logger log = Logger.getLogger(EnviarMadridActionHandler.class);
      
       @Override
       public void execute(ExecutionContext executionContext) throws Exception
       {
      
       System.out.println();
       System.out.println();
       System.out.println("*********************************");
       System.out.println(" Entro en EnviarMadridActionHandler");
       System.out.println("*********************************");
       System.out.println();
       System.out.println();
      
       log.debug("Finalizo la tarea EnviarMadrid");
       executionContext.getTaskInstance().end();
      
       }
      }



      Please help me. Thanks