8 Replies Latest reply on Sep 28, 2005 7:12 AM by Ronald van Kuijk

    Deployment Error and Error getting Task List

    Lajos Farkas Newbie

      Configuration:

      JBoss 4.0.2, database is MySql, and i use jbpm 3.0 from an application.

      Also, i use the process editor from the jbpm-starter-kit, to deploy the process.


      questions/problems :
      1. I can't deploy the process, if i set the assingment handler to the swimlane. It works properly if i use it on the Task. I'm missing something?

      2. By using this code i create a process and i create the start task :

       ProcessDefinition pd = jbpmSession.getGraphSession().findLatestProcessDefinition("simple");
       ProcessInstance pi = new ProcessInstance(pd);
       TaskInstance ti = pi.getTaskMgmtInstance().createStartTaskInstance();
       jbpmSession.getGraphSession().saveProcessInstance(pi);
       jbpmSesison.commitTransactionAndClose();
      

      When i want to get the tasks for user 'ernie', sometimes i got it, sometimes i have an empty list. Even if i don't deploy the process, the application... just restart the machine... I can't imagine what's wrong.
      The code used to get the process list
      List l = jbpmSession.getTaskMgmtSession().findTaskInstances("ernie");
      



      What i'm doing wrong ?

      ------The process definition file------
      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition name="simple1">
      
       <swimlane name='employee'>
       <!-- assignment class="com.simple.action.SwimlaneAssignmentHandler"/-->
       </swimlane>
      
       <start-state name="start">
       <task name="Start simple process, task1">
       <assignment class="com.sample.assignment.SwimlaneAssignmentHandler"/>
       <controller>
       <variable name="color" />
       <variable name="size" />
       </controller>
       </task>
       <transition name="tr1" to="end"></transition>
       </start-state>
       <end-state name="end"></end-state>
      </process-definition>

      ----


      -----the SwimlaneAssingmentHandler.java-----


      public class SwimlaneAssignmentHandler implements AssignmentHandler {
      
       public SwimlaneAssignmentHandler() {
       }
      
       public void assign(Assignable assignable, ExecutionContext executionContext)
       throws Exception {
       assignable.setActorId("ernie");
       }
      }
      

      -----