2 Replies Latest reply on Oct 6, 2006 4:25 AM by jagadee c

    Regarding process variables

    jagadee c Newbie

      Hi,


      I am facing problem while coping process variables into database.
      I am not able to store values into database. is there any code sample for this proble?

      I am using following code to store process variable into database.

      TaskInstance.setVariable(variableName,value);
      TaskInstance.setVariable(variableName,value);
      TaskInstance.setVariable(variableName,value);
      JbpmContext.save(processinstance);

      my processdefinition code is


      <variable name="Variablename" access="read,write,required" mapped-name="Variablename" />
      <variable name="Variablename" access="read,write,required" mapped-name="Variablename" />
      <variable name="Variablename" access="read,write,required" mapped-name="Variablename" />


      Please guide me.

      Thanks in advance.

      Jaga

        • 1. Re: Regarding process variables
          Alejandro Guizar Master

          What problem are you facing? Any stack traces?

          • 2. Re: Regarding process variables
            jagadee c Newbie

            Hi,

            In JBPM_VARAIABLEINSTANCE database table, there is feild called CLASS_.
            What is the meaning of that field. If execute processinstace as per code in the previous post , the program is creating total 6 variables and inserting into JBPM_VARAIABLEINSTANCE table. The program is not assigning the values to the variables present in the proccess definition. It's creating new varibles with same names and assigning values passed as input through .setVariable(); . after that if we see the table JBPM_VARAIABLEINSTANCE we can find 6 variable , 3 with CLASS_ type
            "N" and three with CLASS_ "S" . But, I am getting value for only CLASS_ type "S". CLASS_ type variables "N" have null values.

            Why I am getting duplicate values? What are CLASS_ type N and S?

            Please guide me.

            Thanks
            Jagadeesh