cancel
Showing results for 
Search instead for 
Did you mean: 

How to use ServiceTask to make REST call?

alfresco1576
Champ on-the-rise
Champ on-the-rise

Hi !!

I need help ASAP

I want to implement ServiceTask using expression and variable that holds the URL. So if the variable changes, the URL changes and can be used in the ServiceTask to do the REST call.

Can someone help me with examples, if possible?

Thanks for the help !!

4 REPLIES 4

jose_leon_coupa
Confirmed Champ
Confirmed Champ

Hi,

You can use a Script task instead and implement the REST call in Groovy. There are examples out there:

https://www.baeldung.com/groovy-web-services

https://stackoverflow.com/questions/25692515/groovy-built-in-rest-http-client 

http://rest.elkstein.org/2008/02/using-rest-in-groovy.html

Hope this helps.

Hi,

You can use JavaDelegate and make rest call from that.

By Default Rest Call component is there so you can use that also.

Hi @sanjaybandhniya

Actually I was trying to find a way other than Java but thank you for the inputs as I will keep that in the bucket. 

Hi @jose_leon_coupa 

Thanks for giving examples to use Script task. It's helped.