3 Replies Latest reply on Feb 8, 2013 1:18 PM by swiderski.maciej

    Getting information from another Database

    sadiroveski

      Hello,

       

      I am trying to get information from a Production Database to display them in the form. For example, the employee wants to create a new customer, he will run the process and add a new customer and select the country from a Combo Box (The combo box here is filled in information from the database) then the selected country will be assigned to the process variables.

       

      Conceptually, I am thinking of 2 approaches:

       

      • Getting information from a Production Database (Approach 1):
        • Specific task will connect to a database to capture all information
        • The task will assign the values to the process
        • The next Form task will get the information from the Process to present them in the form controls (Example: Combo Box)

      This approach will cause to save information to the process in every created process instance. There could be a lot of info, i.e. available counties, available products to sell, registered customers……

      • Getting information from a Production database (Approach 2):
        • Customize the form controls to access the database to read the information and put them in Form controls.
        • There is no need to create a task to connect to the database and save all information on the process variables or even task variables.

      This approach could not be implemented since the form is built using Freemarker(FTL Files) which is not like JSP where we can’t mix code with HTML. Is there a way to create an object and read from it using FTL?

       

      Regards,

        • 1. Re: Getting information from another Database
          thomas.setiabudi

          Hi Sadiroveski S,

           

          In my case, we do not put our form in the FTL, we fill in the FTL with a link to our application's form (web form).  So the application form will handle all the data that need to be retrieved from the database.  Maybe that can be another alternative approach for you.

           

          But I would like to know if it is possible to do all the data retrieval from the FTL form as well..

           

           

          Regards,

          Thomas Setiabudi

          • 2. Re: Getting information from another Database
            sadiroveski

            Hello Thomas, Thanks for your response.

            Yes, what you are talking about is another approach but I think it is a little bit redundant.

             

            I think it will be good if we can put your Web Forms to communicate with the console, for example to use JSP or JSF for developing forms i.e. It will only read Data from the database and from process instance, Search for a customer, fill it in combo/list box/textbox... and then on submit the values will be returned to the console. It will be very flexible.

             

            The limitations here is that the Console is not designed to call/display a JSF page and to receive data from a JSF back, I dont' know if GWT forms could work.

             

            I hope we can have some guidelines and suggestions from the jBPM team.

             

            Regards,

            • 3. Re: Getting information from another Database
              swiderski.maciej

              Take a look here, as console uses freemarker templates that are quite powerful maybe include can be something useful. This way you could contact another application (like you said runnign jsp or jsf) and get relevant html data as form so they can be submitted to the console for processing.

               

              HTH