I have one concern about system architecture when putting Camunda BPM into a Legacy System. That is should I build one service layer middleware between Camunda and Legacy system. That middleware will take care of every incoming request to Camunda, then transfer to Camunda before responding to client. We can do a lot with the middle layer which is difficult to implement in the Camunda project:
Authentication and Authorization
Logging with a specific format
Custom API (like only one API to get list task and some business data for UI)
Custom response data
How do you think about this approach?
@ApplicationPath("/")
public class MyApplication extends Application {
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> classes = new HashSet<Class<?>>();
// add your own custom classes
classes.add(CustomController.class);
...
// add all camunda engine rest resources (or just add those that you actually need)
classes.addAll(CamundaRestResources.getResourceClasses());
// mandatory
classes.addAll(CamundaRestResources.getConfigurationClasses());
return classes;
}
}
Not required to implement additional service layer to integrate with camunda. Either you can embed the camunda with your legacy application itself (can leverage the camunda built-in java api) or else you can externalize as standalone/container managed service (built-in java api or rest api).