In our process at most of the user tasks, we need to display data collected during previous tasks of the process.
I would like to do the following:
have one form that deals with only the data to be accepted in that specific user task (typically a small form with a couple of fields). This form always needs to be displayed first
have another form that contains/shows all of the data collected so far (this will be a huge form with many fields)
However, it seems to me that in Camunda, only one form can be configured for a certain user task (a single form-key).
This forces me to create a dedicated form for each and every user task by copying-and-pasting a LOT of form fields from other forms (which is a maintainability nightmare).
How can this be solved without massive form-code duplications and maintainability issues?
I thought of integrating all of the process fields into a single form (a section for each data group) and dynamically hide sections it with process variables but that doesn’t sound very elegant.
I am designing the embedded forms in a simple text/html editor (IntelliJ IDEA in this case). Not using any kind of visual designer.
I am setting the form-key of the user task in the Camunda Modeller desktop app (Linux version). (I can edit the XML directly if necessary but I use the Modeller for setting many development/execution related attributes after I get it from the business analyst. I will need to continue to make changes on it with the Modeller after I set the form-key for a task)
I am deploying the forms together with the bpmn diagram into the Camunda instance (with the Camunda Modeller during development, probably the REST API in production via the CI/CD pipeline)
If you have access to the java code, one way to do things is to store your forms anywhere you like, bind the form key to where you stored your form and return the form data when you’re returning the task.
This way you can be efficient with your forms and not worry much about re-writing stuff all over again.
I thought you were gonna render the form on an independent app and not in the camunda modeler. This is why I recommended you use the form key field to bind it to another form-id, in the UI you are rendering your forms in.