1 Reply Latest reply on Mar 7, 2014 4:33 AM by salaboy21

    Really Basic Process + Form question

    minamesephy

      Hi,

      I'm trying out jBPM for the first time, and I'm a bit stuck on getting the process variables to show up in the forms.

       

      I created a REALLY simple process, with just two activities (Approver 1 and Approver 2). The process has ONE variable definition, firstname. I created a form for approver 1 using the markup editor in the KIE Workbench, and have this

       

       

      <!DOCTYPE html>

      <html>

      <head>

          <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <meta http-equiv="Content-Script-Type" content="text/javascript" />

        <meta http-equiv="Content-Style-Type" content="text/css" />

       

       

        <title></title>

      </head>

      <body>

       

       

        <center>

        <h2>

            Enter in user info 

        </h2>

        </center>

       

        <div class=""><label for="txt">First Name:</label><input type="text" name="firstname" id="firstname"/></div>

       

       

      </body>

      </html>

      Screen Shot 2014-03-06 at 10.21.14 AM.png

      When I first created an instance of the process, it gave me the option of entering a value for the process variable "firstname", so I entered "Hi There". It looks like the value persists, nut for some reason, the variable is not showing up in the Firstname: ____ text field in the Approver 1 "Work" form.

      Screen Shot 2014-03-06 at 10.20.52 AM.png

       

       

      I just want the field to be pre-populated with the process variable value for it. I feel like it probably has something to do with the data input set or data output set? But if so, I don't know what I'm supposed to do for those or for the Assignments field.

       

      Any help or suggestions (or if you could point me to the right documentation), I would really appreciate it.

      Thanks!

        • 1. Re: Really Basic Process + Form question
          salaboy21

          Hi Tali,

          yes it is definitely related with data input and data output. You need to make sure that the variables are mapped correctly in order to move the information from one task to the process and to the process to the second task.

          In order to do that you  need to go to the process designer click in your tasks and set the DataInputs, DataOutputs and Assignments.

          DataInputs and DataOutputs just define the names of the variables that are going in and out from your tasks and the assignments define how the data will be copied from the process scope to the task scope and viceversa.

          Take a look at the examples in the processes here: droolsjbpm/jbpm-playground · GitHub to get an idea about how these mappings work

          Open the process that are in that repository and check their mappings.

          Regards