cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Rest API

reinaud
Champ in-the-making
Champ in-the-making
Hi All,

Is there some possibility to call a URL in a task created in the Activiti designer? I tried to do this with script task (has not the right javascript libaries) and with the service task (only found out to call a webservice).

So I would like if somebody could reply a example of how to do the http call in Activiti.

Thanks in Advance! 
3 REPLIES 3

trademak
Star Contributor
Star Contributor
From a service task you can just implement it in Java. So yes you can implement invoking a URL there.

Best regards,

reinaud
Champ in-the-making
Champ in-the-making
Thank you for the reply.

I looked up for it in the user guide http://activiti.org/userguide/index.html#bpmnJavaServiceTaskImplementation.

I needed to do something like this ??, but for me it's not clear where to put the JAVA logic in the Activiti Designer.
<serviceTask id="javaService"
             name="My Java Service Task"
             activiti:class="org.activiti.MyJavaDelegate" />

tiesebarrell
Champ in-the-making
Champ in-the-making
You don't. You implement the call in the Java class you have listed there, org.activiti.MyJavaDelegate.