Hey @steftriant,
Sorry for the late response. Been away with some customers.
Based on the process model that was attached in the last message. My recommendation would be the following.
- The Service Task should be using a Java Delegate. Such Java Delegate should be doing something like this.
Map<String, String> productTypes = new HashMap<String, String>();
productTypes.put("001", "Notebook");
productTypes.put("002", "Server");
productTypes.put("003", "Workstation");
execution.setVariable("AVAILABLE_PRODUCT_TYPES", Spin.JSON(productTypes));
Note that the Java Delegate example in here does not really explain what is the customerData object. So it makes it a little confusing as to what needs to get serialized and how to do it.
The idea with this Java Delegate is that from here it is possible to fetch data from an h2 database. Personally I am not an h2 SQL query expert, but using some Java code it is possible to fetch data from almost anywhere. From a quick Google search I found this tutorial. Of course, some code logic to parse the data would be necessary.
- Next the User Task Embedded form should have the following.
<select cam-variable-name="PRODUCT_TYPE"
cam-variable-type="String"
cam-choices="AVAILABLE_PRODUCT_TYPES">
</select>
Note that I did not hard code any of the values, but these were dynamically read using the cam directive.
Hope this helps!
Regards,