2 Replies Latest reply on Jan 4, 2006 6:09 AM by m y

    to show variableinstance information in jbpm:table

    m y Newbie

      I want to add 1 column in the following table
      value of that column get stored in variableinstance
      So How can i show the information from jbpm_variableinstance table name fields in

      <jbpm:table name="homeform" property="tasks">
      <jbpm:column title="Token Number" property="actorId" />
      <jbpm:table>

        • 1. Re: to show variableinstance information in jbpm:table
          m y Newbie

           

          "sera" wrote:
          I want to add 1 column in the following table
          value of that column get stored in variableinstance
          So How can i show the information from jbpm_variableinstance table name fields in

          <jbpm:table name="homeform" property="tasks">
          <jbpm:column title="Token Number" property="actorId" />
          <jbpm:table>

          The code above is from home.jsp file.
          I am using jbpm2.0
          I have stored some variable e.g firstname in jbpm_variableinstance through .from file
          Then that variable is stored in name field of jbpm_variableinstance table.
          i want to show serialized value of that variable firstname using <jbpm:column> tag. So how should i do this?
          can anybody help me?

          Thanks in advance



          • 2. Re: to show variableinstance information in jbpm:table
            m y Newbie

            Hello,

            I have found out the solution to my problem i have described above by the following steps.

            Can anybody tell me that if it is a correct way?

            And if it is a coorect way i have posted it to help other jbpm users if they come across the same problem which i have phased.

            i have added one column mytokencnt. In that column i am displaying the dummy tokennos (like serial numbers)

            Steps to add column <jbpm:column> ?mytokencnt? in <jbpm:table> of home.jsp file

            1> Add the following line to this file :-

            File :
            ${jbpm.home} \core\src\java\org\jbpm\model\execution\impl\TokenImpl.hbm.xml



            2> Add the following code to TokenImpl.java file
            File : ${jbpm.home} \core\src\java\org\jbpm\model\execution\impl\TokenImpl.java

            private String mytokencnt = null;
            public String getMytokencnt() { return this.mytokencnt; }
            public void setMytokencnt(String mytokencnt) { this.mytokencnt = mytokencnt; }

            3> Add one column in table jbpm_token
            e.g. alter table jbpm_token add column mytokencnt BIGINT;

            4> In forms.xml file add following line to all forms you are using in application
            File : ${jbpm.home}\example\src\process\payraise\forms.xml


            5> In request.form file from ${jbpm.home}\example\src\process\payraise\forms
            Directory add following line

            Case 1>
            If you want to generate field values by your own logic, in request.form file add following
            Line



            And write logic in
            File : {jbpm.home}\web\src\java\org\jbpm\web\struts\action\TaskFormSubmitAction.java

            st1 = "update jbpm_token set tax = '"+request.getParameter("tax")+"'
            where id = '"+gentokenId+"'";
            stmt3.executeUpdate(st1);

            Case 2
            If you want input from user first time in request.form file add following
            line instead of above line


            7> Add the following line to ${jbpm.home}\web\src\jbpm.war\home.jsp file
            <jbpm:column title="My Token Number" property="mytokencnt" />