I have the following formField in my startEvent:
<camunda:formField id=“state” label=“State” type=“enum” defaultValue=“DRAFT”>
<camunda:value id=“DRAFT” name=“DRAFT” />
<camunda:value id=“SUBMITTED” name=“SUBMITTED” />
<camunda:value id=“CLOSED” name=“CLOSED” />
</camunda:formField>
In a subsequent Task, I have the same formField, but I cannot figure out how to have the defaultValue properly set.
For instance: <camunda:formField id="state" label="State" type="enum" defaultValue="${state}">
does not work. I am using the Camunda Tasklist WebApp.
do you already have a solution to this problem?
I’m asking, because currently I have the same problem and if you still need a solution, I could post it here after I found it.
Thank you very much for the reply.
I found out that we use a custom adjusted logic to create the forms from the camunda BPMN model.
So I extended this logic to fit my needs.
I have the exact same question as knotthere, and i’m not clarified yet.
I think he asked about a default value in a variable of type “enum” and not “string”. I already tested with string and it works, so can i assume that this feature is not enabled for enums?
change the id of enum you are binding to. If you use different id for form field and different id for default value it will work and also use a blank id enum at the beginning.
I ran across the same issue where the enum data type was being represented as a string in the form field. The way I got it to be an object was by going into the Input/Output tab instead of the form field and creating a list variable there.