AnsweredAssumed Answered

Required field not working

Question asked by ilansch on Dec 6, 2015
Latest reply on Dec 8, 2015 by jbarrez
Hi, I have created a simple model with 2 form properties variables.

The model has a start point, to the start i connected a user task, and connected the user task to end point.
in the user task i added 2 form properties and set them with "required" attribute:
<activiti:formProperty id="SomeID" name="Some ID" type="long" required="true"/>
<activiti:formProperty id="SomeName" name="Some Name" type="string" required="true"/>

now i am trying to send http message to the Rest API (via C#) to complete the task.

When i send the request with no variables in json body -> it is ok (get a response), how could it be ? shouldnt i get error message that the required variables are not in the json body?
second of all, when i am trying to send the json body variables, i get bad request message.
the json body looks like:
{\"action\":\"complete\",\"variables\":[{\"Name\":\"Some ID\",\"Value\":\"12345\"},{\"Name\":\"Some Name\",\"Value\":\"Moshe\"}]}

what is wrong with this ? maybe the variable type in body invalid ? i have set SomeID to be long, and in the json body it is string, does it know automatically to cast string to long?