HI @kontrag,
depending on how you want to build your user interface you have two options I guess:
a) Change the process model to have a service task after the User Task in which you present this “batch select” to the end user. Then you could use the standard Camunda tasklist features and let the user complete the task. After the user completed the task within your service task you would get the data from the database. After the service task you either have a new user task or cycle back to the first user task.
b) Add JavaScript (e.g. reusing existing AngularJS or jQuery) within the embedded form which requests onChange the variables from a REST endpoint within your application server on which camunda is running. You could create such endpoint within your process application (simple example of doing this in java: https://github.com/camunda/camunda-consulting/tree/master/snippets/ecm-integrations/invoice-cmis/src/main/java/org/camunda/bpm/example/invoice/facade and some very simple jQuery: https://github.com/camunda/camunda-consulting/blob/master/snippets/ecm-integrations/invoice-cmis/src/main/webapp/forms/upload-new.html#L44)
Hope this gives you some ideas.
Best
Felix