AnsweredAssumed Answered

Activiti enum type

Question asked by afenske on Feb 15, 2013
Latest reply on Feb 15, 2013 by frederikheremans1
Hello, everybody.

I have a question. How can I make an Activiti form enum from Java code. In other words, I used two cases.
The first one:
Map<String, String> map = new Hashmap<String, String>();
map.put("one", "oneVal");
map.put("two", "twoVal");
execution.setVariable("var", val);

After that I created the form in User Activity and defined a enum field pointed to "var" variable. But during the execution I had this error: "Model value should be a String".

The second one:
Map<String, String> map = new Hashmap<String, String>();
map.put("one", "oneVal");
map.put("two", "twoVal");
EnumFormType en = new EnumFormType(map);
execution.setVariable("var", en);
But here I got another error: "Couldn't find a variable type is able to serialize org.activiti.engine.impl.form.EnumFormType@19c4e515"

Best regards,
Anton Fenske.

Outcomes