Error validation generated form

Hello everybody,
I’m trying to insert in Default Value of my field form “nome_cognome” the value
${CurrentUser()} as you can see from screenshot

When I start the task and I Complete the task I have this error… Why ?
Can you help me ?

21-Apr-2020 18:19:03.515 SEVERE [http-nio-8800-exec-822] org.camunda.commons.logging.BaseLogger.logError ENGINE-16006 BPMN Stack Trace:
StartEvent_1 (activity-start, ProcessInstance[d0febcd3-83eb-11ea-931e-005056b04c95], pa=FL-Task Richiesta Ferie)
StartEvent_1, name=Inserimento richiesta

21-Apr-2020 18:19:03.516 SEVERE [http-nio-8800-exec-822] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: Invalid value submitted for form field ‘nome_cognome’: validation of required failed.
org.camunda.bpm.engine.impl.form.validator.FormFieldValidatorException: Invalid value submitted for form field ‘nome_cognome’: validation of required failed.

My assumption here is that you’re starting and completing from the Tasklist web application.

I was able to reproduce as you described… it looks as though the variables payload of the submit_form request being made by the frontend is empty (e.g. {"variables":{}}). If you delete the pre-populated user (e.g. demo), enter in some other data (e.g. demo1) and hit submit, the request is successful. On the other hand, if you delete the pre-populated user (e.g. demo), then manually re-enter the same user (e.g. demo) and hit submit, the request will fail again (makes me wonder if there is some error in isDirty logic somewhere in the frontend code).

I know this doesn’t fully answer your question, but hopefully provides some additional context for someone else looking in…


Thank you @jgigliotti I had the same intuition about it. There is no way to bypass this behavior ?

I couldn’t spot a convenient workaround that will allow you to maintain the behavior you’re looking for. I can’t speak to why the logic is what it is but, in this code here, it explicitly leaves out variables that haven’t changed. Might be worth filing a bug report with your findings, I went back as far as 7.7 and saw the same behavior.

Thank your response @jgigliotti . I’ve decided to replace the “generated form” with an “embedded form” and I found an example to get the username logged on the Tasklist. I’ve opened a new post How to pass variable value in a form because I can’t pass the value of the variable inside the form. Can you help me ?, I’m not a developer so I move with great difficulty with javascript, AngularJS, …