in my process user task “Check data” I have various forms defined.
In my service task “Fetch data” I am retrieving some data and adding form fields to the form data which is defined in “Check data”.
I can see that the BPMN model is updated when I print the DOM. But in the process “Check data” where the form fields are shown, only the original forms are visible. The newly added fields are not shown.
This will not work. You have to deploy a new version of that process, but even then when the process instance continues from Fetch data to Check data the newly added form fields will not be shown.
As an alternative you could try to use embedded task forms 1, where you could hide unnecessary fields depending on the data fetched in Fetch data.
What is your use case? Would it be possible to predefine the necessary fields and just hide the unnecessary ones?
The use case is to create forms dynamically based on the delivered data.
I will evaluate your approach of hiding fields. This will work for demo purpose.