0 Replies Latest reply on Oct 3, 2005 8:15 AM by dablue

    Set variable type, Save variable value PROBLEM

    dablue

      Hi All,

      Since i could not find a method to set the variable type in the process definition, i use a trick to instantiate them to the required type (well, at least i try to).

      I Created a TaskControllerHandler and i set the variables there, and also i initialize them. This TascControllerHandler is used only by the StartTask.

      All works fine but:

      1. How about the other variables, which i don't need them at the beging, but i need them later? Where should i create them?
      2. What code to add to submitParameters(...) to actually save the variables, in order to be usable from other tasks?
      3. Is there any way to set the variable type ? (I need it in order to be able to render it's editor correctly).

      ---- here is the TaskControllerHandler -----

      public class StartProcessController implements TaskControllerHandler{
      
       public List getTaskFormParameters(TaskInstance taskInstance) {
       ArrayList params = new ArrayList();
       VariableAccess access = new VariableAccess("start_date","read, write","start_date");
       TaskFormParameter tfp = new TaskFormParameter(access, new Date());
       params.add(tfp);
      
       access = new VariableAccess("end_date","read, write","end_date");
       tfp = new TaskFormParameter(access, new Date());
       params.add(tfp);
      
       return params;
       }
      
       public void submitParameters(Map parameters, TaskInstance taskInstance) {
       }
      }