I am using Camunda 8.7
Our process supports one customer right now, but we are currently working on enabling multiple customers to be processed in the same process instance. In our first user form, the Dynamic List component allows the user to enter as many customers as their heart desires and have that be saved to a global variable. So far so good, that means we have the list of involved customers.
Later in the process, we have another user form with a step where the users must collect a list of relevant documents for each customer. One document on the list may be relevant to collect for one of the involved customers, but not for the other.
I am having trouble designing this user form in a smart way, for example by including some pre-population of it based off of how many customers was entered previously.
Any suggestions as to how I should build it is very welcome.
Thanks in advance
You can design your document collection form by pre-populating a Dynamic List component with your customer data and using conditional visibility to show customer-specific document options. I found the following relevant resources:
Does this help? If not, can anyone from the community jump in? 
Hints: Use the Ask AI feature in Camunda’s documentation to chat with AI and get fast help. Report bugs and features in Camuda’s GitHub issue tracker. Trust the process. 
Hello tobiasskov,
There are two possible approaches to implement your requirement, and the choice mainly depends on your functional need.
The first approach is to use a single User Task with one form handling all customers. This approach is suitable if the same user who initially enters the list of customers is also responsible for collecting documents for all of them. In this case, you can reuse the Dynamic List component in your second form. Each item in the list represents a customer, and you can extend the structure by adding a file upload field (with multiple file selection enabled) for each customer. This allows the user to upload one or more documents per customer within the same form. While this approach keeps everything in a single task, it can become harder to maintain and less user-friendly as the number of customers increases.
selectCustomers.form (972 Bytes)
DynamicForms.bpmn (3.5 KB)
collectDocuments.form (809 Bytes)
The second approach is to use a multi-instance User Task, which is generally the recommended pattern in Camunda. In this setup, you configure the User Task to iterate over the list of customers using the collection variable (for example, customers) and define an element variable (for example, customer). Camunda will then automatically create one task per customer, potentially in parallel. Each task will receive a single customer as input (for example, customer = customers[index]), and the associated form will be much simpler, focusing only on collecting documents for that specific customer. This approach improves readability, scalability, and user experience, and aligns better with Camunda’s design principles.
collectSingleDocuments.form (681 Bytes)
MultiUserTask.bpmn (3.8 KB)
In summary, if your use case requires a single user to handle all customers at once, the first approach can work. However, if customers should be handled independently, the multi-instance approach is strongly recommended as it leads to a cleaner and more maintainable solution.
Hope this helps!
Hello Tarek
Thank you very much for your elaborate response. It is much appreciated.
Luckily for us, we don’t have to actually have the Camunda instance contain the document files, that the users are collecting (at least for now). The multi-instance user task is a very interesting idea, which I am about to try out. I will let you know how it works out!
Once again thank you for your time.
Br Tobias
1 Like