4 Replies Latest reply on Jan 27, 2009 6:25 AM by kukeltje

    Populating DropDown list from database in the Task form

      Hi All,

      I want to populate dropdown list values from database table in the Task form.

      I know how to do in the JSF, first we have to declare ManageBean in the faces-config.xml and use selectManyMenu for display. Bean will extract data from database that returns list of values.

      In JBPM processdefinition how to do this.? There is no faces-config.xml file when we created new processdefnition.

      One way is I have to edit faces-config.xml in the jbpm-console.war; Is there any otherway I can do this task.

      Extracting data from databse and showing those values in drop down list in the JBPM Task form.


      Thanks in advance...

        • 1. Re: Populating DropDown list from database in the Task form
          kukeltje

           

          One way is I have to edit faces-config.xml in the jbpm-console.war; Is there any otherway I can do this task. [/quote
          No, well..... yes, write your own full application and not re-use the jBPM console


          • 2. Re: Populating DropDown list from database in the Task form

            Thanks for help.

            Currently, after creating form from the procesdefinition task, I am editing form field for dropdown values, like below:

            <h:selectOneMenu id='Priority' value="#{var['Priority']}">
            <f:selectItem itemValue="3" itemLabel="Minor" />
            <f:selectItem itemValue="2" itemLabel="Medium"/>
            <f:selectItem itemValue="1" itemLabel="Major"/>
            <f:selectItem itemValue="0" itemLabel="Blocking"/>
            </h:selectOneMenu>

            Instead of hardcoding I want to extract the values from database using Java code and display in the code.

            I guess this functionaity should be available in the JBPM. Which is a very good future and helps a lot for quickly developing and testing with Admin console.

            • 3. Re: Populating DropDown list from database in the Task form

              Sorry for spelling mistake ..

              **good future --- Good Feature

              Any help..

              I just want to test dropdown list using admin console .. I don't want to create GUI now..

              • 4. Re: Populating DropDown list from database in the Task form
                kukeltje

                The admin console is limited in more ways (look and feel, security, etc...) currently a (yet another) new admin console is being developed, where this kind of functionality is being discussed. The problem, is, where to retrieve this data from? A process variable? A database? A file? A bean? It is difficult (resource wise) to support all.

                Personally I develop a ui almost as fast now with seam/jsf/xforms and some basic beans I've written that the admin console is almost just an admin console. I do not even use it for RAD anymore. So for me it realy paid of to invest some time in a gui