How do I pass more than 4000 characters in a form to Camunda?

Hello,
we have a form for starting a process (type: embedded or external task form). In this form it happens that the characters in a certain field are more than 4000 and therefore an error message appears:

“value too long for column text_ varchar (4000)”.

In the field we want to pass HTML code, so we quickly exceed the 4000 characters. And currently we are using string as data type.
Is there any way to pass more than 4000 characters in a form to Camunda? We have already read the possibilities to wrap the answer in an object and not in a string or to use camunda spin and json, however we don’t find a way to apply this.

How can I solve the problem?

Wrapping the string in an object is definitely the correct solution. Did you try defining your wrapper-type as “custom type” in the form?

Another option is a bit hacky, but working: Use “string” as the type of your text variable, but mark it “transient” … A transient variable will not be stored in the DB. Then use a Listener to read the transient variable from the execution and store it in a wrapped type programmatically.

i try to define a textarea in a embedded html form.
How can i set it to an object or a transient variable, that i can start a proccess with more than 4000 chars?

<textarea id="summernote" name="additionalInfo" cam-variable-type="String" cam-variable-name="additionalInfo" required ng-model="additionalInfo"> </textarea>
		

Hi @ghost,

check the handling of a JSON variable in embedded forms here: Working with Json Data | docs.camunda.org

Hope this helps, Ingo

1 Like

Hello,
We created a json variable as instructed as suggested in the link.
We want to enter text into a Summernote field (HTML Text Editor) in the form, which is then passed to a hidden text field. We want to take the content from this field.
Ultimately, we only need the HTML code, which can be over 4000 characters long, in a Camunda variable.

However, after submitting the form, the content from the field is not transferred to the json variable.

However, if we write directly into the hidden textbox, the content will be saved in the json variable after the form is submitted.

How can we fix this?