1 Reply Latest reply on May 31, 2007 12:38 PM by ricardomarques

    Getting variables instances

    ricardomarques

      hello

      I'm having some trouble accessing process variables to user input.

      I'm retrieving the information remotly width:

      Command cmd = new GetTaskInstanceCommand(tid);
      Object result = getEjbClient().getCommandService().execute(cmd);
      this.taskInstance = (TaskInstance) result;
      


      When I debug my application and check the Map that contains the variables is null. And on the database for this task instance the variables are on the table.

      I don't know if this way is the rigth way to go, so... any help on this would be appreciated

      I'm using the holiday request for this, the definition follows:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition
       xmlns="urn:jbpm.org:jpdl-3.1" name="holiday-request">
       <swimlane name="initiator">
       <assignment expression="user(grover)"></assignment>
       </swimlane>
       <start-state name="enter request">
       <task name="request entry" swimlane="initiator">
       <controller>
       <variable name="start date" access="read,write,required"></variable>
       <variable name="duration" access="read,write,required"></variable>
       </controller>
       </task>
       <transition name="" to="evaluate request"></transition>
       </start-state>
       <end-state name="end"></end-state>
       <task-node name="evaluate request">
       <task name="entry evaluation" swimlane="initiator">
       <controller>
       <variable name="start date" access="read"></variable>
       <variable name="duration" access="read"></variable>
       <variable name="info" access="read"></variable>
       <variable name="decision"></variable>
       </controller>
       </task>
       <transition name="More info needed" to="give addition info"></transition>
       <transition name="approve/disapprove" to="end"></transition>
       </task-node>
       <task-node name="give addition info">
       <task name="additional info entry" swimlane="initiator">
       <controller>
       <variable name="start date" access="read"></variable>
       <variable name="duration" access="read"></variable>
       <variable name="info"></variable>
       </controller>
       </task>
       <transition name="" to="evaluate request"></transition>
       </task-node>
      </process-definition>



      PS: Sorry the bad english.

        • 1. Re: Getting variables instances
          ricardomarques

          BTW i turn the debug and I get this:

          17:30:57,484 DEBUG [AbstractFlushingEventListener] Flushing entities and processing referenced collections
          17:30:57,484 DEBUG [Collections] Collection found: [org.jbpm.taskmgmt.exe.TaskInstance.variableInstances#11], was: [org.jbpm.taskmgmt.exe.TaskInstance.variableInstances#11] (uninitialized)
          17:30:57,484 DEBUG [Collections] Collection found: [org.jbpm.taskmgmt.exe.TaskInstance.pooledActors#11], was: [org.jbpm.taskmgmt.exe.TaskInstance.pooledActors#11] (uninitialized)
          17:30:57,484 DEBUG [Collections] Collection found: [org.jbpm.taskmgmt.exe.TaskInstance.comments#11], was: [org.jbpm.taskmgmt.exe.TaskInstance.comments#11] (uninitialized)
          


          Is it supose to be (uninitialized) ? Am I doing this the wrong way?