I would like to propose a change in org.activiti.engine.impl.form.StringFormType.convertModelValueToFormValue method, as in the attached file.
The goal is to avoid a class cast exception that is thrown when a developer makes a mistake (regarding object type) and now cannot even cancel tasks and/or the process because of the CCE.
THIS CHANGE IS BASED ON ACTIVITI 5.0.21.