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.
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.
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.