Rest API - Task - Form variables - Type as string until executed

Hello,

I am getting the task form variables using: task/${id}/form-variables

Apart from the fact that it is fetching all values instead of on my task form as reported here (https://app.camunda.com/jira/browse/CAM-8247), I have a form variable defined in my User task as a Date. But it will always return it as String until I execute the task.

Example, it returns:
“myDate”:{“type”:“String”,“value”:null,“valueInfo”:{}}

My expected would be:
“myDate”:{“type”:“Date”,“value”:null,“valueInfo”:{}}

When I complete the tasks and it saves the information, if I get the form-variables of the next task, it will come as:
{“myDate”:{“type”:“Date”,“value”:“2017-10-19T00:00:00”,“valueInfo”:{}}}

I am working on custom UI based on the Rest API and I did not want to rely on the XML call from my front-end.
So is it possible or in the plan to:

  • Have the right type for Date before the value is saved?
  • Show additional properties (like required, etc…) from form-variables rest api?
  • Only show the form of the current task ( as the feature request linked above)?

Best Regards,

Hi mathieu,

from my understanding this seems like a bug.
Feel free to create a bug report in our ticket system.

Cheers,
Tassilo