AnsweredAssumed Answered

REST - Store a date

Question asked by krigu on Nov 27, 2011
Latest reply on Nov 28, 2011 by trademak
I have a formitem with a date type and I want to submit the date-value via the REST interface.. What I wonder now is how can i do that? I have checked the source and it seems that the REST-server stores every value different than "true" or "false" as a string. If I want to reuse the value after as a Date (use as Value for another date-formproperty in the next task) I get the following error :


java.lang.IllegalArgumentException: Cannot format given Object as a Date
   at java.text.DateFormat.format(DateFormat.java:298)
   at java.text.Format.format(Format.java:157)
   at org.activiti.engine.impl.form.DateFormType.convertModelValueToFormValue(DateFormType.java:62)
   at org.activiti.engine.impl.form.FormPropertyHandler.createFormProperty(FormPropertyHandler.java:51)
   at org.activiti.engine.impl.form.DefaultFormHandler.initializeFormProperties(DefaultFormHandler.java:114)
   at org.activiti.engine.impl.form.DefaultTaskFormHandler.createTaskForm(DefaultTaskFormHandler.java:31)
   at org.activiti.engine.impl.cmd.GetTaskFormCmd.execute(GetTaskFormCmd.java:54)
   at org.activiti.engine.impl.cmd.GetTaskFormCmd.execute(GetTaskFormCmd.java:30)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
   at org.activiti.engine.impl.FormServiceImpl.getTaskFormData(FormServiceImpl.java:56)
   at ch.ultrasoft.process.sanktion.Process.main(Process.java:109)

Outcomes