BEA AquaLogic BPM Studio 6.0.4 (Will also work on previous versions)
Create instance variable for the array
Load array from database
Create an "Automatic" component on your screenflow and add code similar to the following in order to load the array defined above.
params = "STATES" //local var defined as String
for each row in executeQuery(DynamicSQL, sentence : "select text,value from lookups where lookup_name = ?",
implname : "YOUR DB", inParameters : params) do
statesList[String(row["text"])] = String(row["value"])
// You could also use "inParameters : ["STATES]" and save yourself from defining the params local variable.
Pass array into JSP
Place an "Interactive Component Call" on your screenflow. Double-click on your component so the "Main Task" editor appears. Select "BPM Object Interactive Call" and select your object variable and JSP. You must then select "Argument Mapping" in order to pass your array into the JSP.
Create the select on the JSP page
Here is some example code I use in my JSP to display the data from the array in the select box:
Hopefully this quick tutorial will help you accomplish what you need. I did leave out some details as I'm assuing you have at least a little ALBPM experience. If you need more info or have any problems please let me know.