3 Replies Latest reply on Sep 29, 2006 7:58 AM by auré manga

    Variable Controler

    auré manga Novice

      Hello,

      From a jsp file I have filled in some variable access and I want to save it in the jbpm, but I can't understand how I can save my variable.

      I can have the name of my variable but not save it. I have try to access by there. Must I use a specific classes?

      TaskController taskcontroler=t.getTaskController();
       if(taskcontroler!=null){
       List list=taskcontroler.getVariableAccesses();
       Iterator it=list.iterator();
       while(it.hasNext()){
       VariableAccess var= (VariableAccess)it.next();
       system.out.println(var.getVariableName());
       }
      
      }
      


      But I don't understand how I can save my data in jbpm.

      thank you for your help

      antitrust1982

        • 1. Re: Variable Controler
          auré manga Novice

          How can use VariableContainer? because I can't instantiate it? Somebody can help me to understand how use the varaible of jbpm please?

          thank you for your help

          antitrust1982

          • 2. Re: Variable Controler
            Jitendra Singh Newbie

            TaskVariablesDbTest in the src code test cases explains how to put data in your task instances.

            • 3. Re: Variable Controler
              auré manga Novice

              I have tried to understand how put my value in the variables, but seems to don't work.

              I have done this:

              contextInstance.createVariable(var.getVariableName(),Nom,token);
               contextInstance.setVariable(var.getVariableName(),Nom);
              


              Perhaps somebody have ever set his variables and can help me to understand how can put my value in the variables.

              I give you a peice of my xml process definition in order to see you which value I want to set:

               <task-node name='renseignementclient'>
               <task swimlane='FONCIA'>
               <controller>
               <variable name='Nom' />
               <variable name='Prénom' />
               <variable name='Adresse'/>
               <variable name='ville'/>"
               <variable name='codepostal'/>
               <variable name='NumTel'/>
               <variable name='etablissementScolaire'/>
               </controller>
               </task>
               <transition name='valide' to='Validation'>
               </transition>
               </task-node>


              Thank you in advance for your help

              antitrust1982