Hello everyone,
I want to update several variables existing in an array with REST Call
endpoint : api/runtime/process-instances/${id}/variables
Method : PUT
But in Activiti only we are allowed to update one variable because of the request mapping
I am using Alfresco Activiti
Please any help is appreciated
Kind regards.
Solved! Go to Solution.
Btw, you can now do request body JSON mapping in the newer version of the product which was released last week. See REST call | Alfresco Documentation for more details.
However as Greg said, a script/service task would be more appropriate in this particular use case.
but I am using Alfreco Activiti environment , so how can I map this request as json body into the request mapping ?
Your reply is kind of rude.
I just want to update variables of parent process with rest inside a call activity and not in same process, if you don't have an answer you can just not reply.thank you
Apology accepted, thank you for your advice I will take it in consideration.
Hi Ben,
If you are trying to update/add a variable to a parent process from child via a groovy script, the following will do
runtimeService.setVariable( execution.getSuperExecutionId(), 'varname', 'varvalue');
-Ciju
Hi Joseph
Thank you , this works like a charm
Btw, you can now do request body JSON mapping in the newer version of the product which was released last week. See REST call | Alfresco Documentation for more details.
However as Greg said, a script/service task would be more appropriate in this particular use case.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.