I would like to create a REST call using the Alfresco Process Editor which needs to be in the following format:
https://addresscoverage-cd50.restdb.io/rest/addresssample?q={"STREET_NUMBER": ${streetnumber}}
where ${streetnumber} is an input variable from a form in the model. e.g.
https://addresscoverage-cd50.restdb.io/rest/addresssample?q={"STREET_NUMBER": 194}
This works fine in POSTMAN.(call also requires an x-apikey for auth in the header).
Is it possible to construct a URI in this form using the Alfresco Process Editor?
Or can I edit the model XML to achieve the same thing ?e.g.
<activiti:string><![CDATA[https://addresscoverage-cd50.restdb.io/rest/addresssample]]></activiti:string>
<modeler:request-mapping xmlns:modeler="http://activiti.com/modeler" modeler:jsonPropertyName="q" modeler:jsonPropertyType=??? modeler:jsonPropertyValue=???
Hi,
I would suggest to use java execution listener and in the listener you can call this Rest API using any java Rest client.There is a possiblity of passing parameters to the listeners.
Please Refer activiti documentation for further details Activiti User Guide
you can also refer some of the examples on execution listeners in the sommunity
Is it possible to construct a URI in this form using the Alfresco Process Editor?
If I add a request mapping like this, then ${streetnumber} is just taken as text.
I need to be able to add some kind of delimiter to take ${streetnumber} as a variable. Something like (but not) this: " { " STREET_NUMBER " : " && ${streetnumber} && "}"
I also thought I might also be able to construct a JSON template that looks like this:
{
"STREET_NUMBER": ${streetnumber}
}
.. but then I am missing the Property Name "q", so this doesn't work either.
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.