Readonly validation fails for blank form item

The documentation states that readonly validation for a user form makes sure no input is submitted for the given field, i.e. the form entry field is readonly and cannot be edited.

I have a user task form that takes represents a task that is created by a message start event. Values entered into the form at the creation of the process instance stage are passed to the user task event and should be displayed as readonly values to the user, who must enter some additional values into fields to complete the task.

When I submit a form where there is no data in one of the readonly fields then the readonly validation fails. The readonly validation is the only validation applied to that field.

Is this expected behaviour and if so, how do I achieve what I am trying to do? i.e. show a blank value in a readonly field.

OK - it appears as if this is a problem if the initial start message does not have variables associated with the readonly fields (I was creating the message with a REST call and didn’t supply empty string values for them). If you supply empty string variables then the validation is ok.

This is a problem for me as well, I do the same as johnlondon. I have ‘fixed’ it by using a NOOP-Script with output parameter that does this:

${varName == null ? “” : varName}

but I think these kind of workarounds should not be needed.