09-04-2018 05:53 AM
Hello everyone,
I have a bunch of questions about usage of service tasks.
First, I need to request external services via rest calls. My project is built using Spring Boot, so I use Spring RestTemplate. Is web service task more suitable for that purpose?
Second, now for each process I have at least one class that implements JavaDelegate. Maybe, there are any best practices to minimize code and make it more readable and reusable? Is there any possibility to call rest service from the process definition?
I would appreciate any code examples or github links.
09-11-2018 11:42 AM
1) Webservice Task isn't designed to do REST calls.
2) You can reuse you JavaDelegate classes using expression and call your service like
activiti:expression="#{myService.doSomething()}"
If you are using APS, there is a REST call task that you can use to do REST calls. If you are in Activiti community then you'll have to implement a REST service and call it from service tasks.
Explore our Alfresco products with the links below. Use labels to filter content by product module.