Hi , I have explored Camunda for some of our workflow management and found it pretty interesting . I have one basic question - If I have my existing REST API which I want to use in my workflow then which is the best approach -
a ) Create Service Tasks - And create Java Delegates on them and execute ?
b ) Create Http Connectors - and directly execute ?
Basically what are the pros and cons of both the approaches ?
HTTP Connector is basically just a java delegate, but its wrapped in a “Connector” interface and has extra xml in the BPMN. HTTP-Connector is just apache HTTP client.
You can recreate the same functionality as HTTP-Connector with your own java delegate + using Input Mappings or Field Injection. Here is a post about the pros and cons of inputs vs field injection: FieldInjections vs Input Parameters.
Also can take a look at this: Replacing Http-Connector with Jsoup usage, which outlines some of the legacy issues with HTTP-connector. (such as inability to handle binary files, or timeout issues that can occur that cause the task to never complete and be stuck). The legacy issues are generally edge cases but they good to know about for your planning.