1 Reply Latest reply on May 30, 2007 11:09 AM by Ricardo Marques

    tasklist and variables

    Ricardo Marques Novice

      Hi I'm using the following process, and I wanted to start a work on a instance of this process, and give some input to the process continues.

      I access the user grover tasklist and start a work on a task instance using the class StartWorkOnTaskCommand, after this i wanna show the variables start-date and duration for user input.

      My problem is that currently after I start a work on a process I get the VariableContainer without variables.

      I'm bad understanding the way this works?


      <?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>
      


      cmd = new VariablesCommand();
      ((VariablesCommand) cmd).setTaskInstanceId(tid);
      result = getEjbClient().getCommandService().execute(cmd);
      
      this.vc = (VariableContainer) result;