I am working on a SharePoint 2013 workflow project which needs some business logic. In SharePoint 2013, workflows are declarative. So to write a custom code, its advised to create a web service and consume it in the workflow. However, i have also tried using a custom activity to write custom code and its working correctly. My query- which is the preferred method ? Is it a best practice to use custom activity to write business logic?
I have done both and from my experience things are a lot easier when you use web services. You don't have to kill vssphost5.exe process all the time if you're using web services. From architecture side of things if custom activity is something that will be reused in workflows then I would definitely use custom activities. For all other scenarios I prefer web services.