I have a project that contains a Business process asset that retrieves data from the database as a list, I need to fetch all those data in Combobox to let the user choose, How can achieve this point? I tried to add a variable to the user that takes the list from the database task and presents it to the user as MultipleSelector, but not works, please help.
1 Answers
First of all do all the necessary setup of the "Execute SQL" Service task as described here.
Create a process model where you add the "Execute SQL" task followed by a Human task. Next add a new Process variable of type the java.util.ArrayList to your process model. Open the properties for the Execute SQL task, configure as assignments (data output) the previou created process variable. Open the properties for the Human task, fill in actor and configure as assignments (data input) the list variable.
Create a new form where you choose the Human task of your process. Pull the assigned variable from the left on the form. In the dialog choose as field type 'multipleselector', select 'required' and unselect 'read only'.
I found out that there exists a JBPM issue (https://issues.redhat.com/browse/JBPM-9595) that blocks using the 'multipleselector' component. Until this is fixed you may want to use the 'multipleinput' instead.