AnsweredAssumed Answered

Rest-API difficulty updating formProperties

Question asked by jyerger on Aug 18, 2014
Latest reply on Aug 19, 2014 by jyerger
I'm having difficultly performing a simple property update via the REST-API.  I've successfully worked out creating and listing info from Activiti, but I just can't seem to set a property.  The json converted property looks to be properly formed, but I still keep getting the error "resulted in 400 (Bad Request)" on execute.  The user’s guide suggests that this is likely happening because of a difference in property scope, but a simple query of all formProperties on this process shows them all as 'local', just as I'm putting into my json. 
Is there any chance of somebody setting me straight?

Activiti version: 5.15.1

Sample code.
String url = http://myServer/activiti-rest/service/runtime/process-instances/25762/variables
RestTemplate restTemplate = getRestTemplate();    <–Spring restTemplate
restTemplate.put(url, request);    <– Spring HttpEntity for request

Request object content before calling 'put' is….
<{"name":"cmoApproved","type":"string","value":"true","scope":"local"},{Content-Type=[application/json]}>

Rest should be making this simple for me as there are only a few elements to deal with.
1.) URL  <– matches users guide…see above
2.) json formatted variable array  <– matches user guide
3.) request method (put, post, get)  <– performing put to update variable

Could my request object be missing something?  Any help would be greatly appreciated!

Outcomes