I have to add some logging logic which should be executed before starting new process in my spring boot app.
There are 3 ways to start process: using cockpit, using REST API, during delegation code using ProcessEngine and its RuntimeService.
To achieve my goal I use Spring AOP and have already wrote @Aspect class with point cut - @Before(“execution(* org.camunda.bpm.engine.RuntimeService.*(…))”).
When new process start from delegation code the additional logic works fine and I see logging message in stdout.
But when I start process from cockpit or using postman - additional logic is not invoked. And there is no message in stdout.
Thanks for your valuable answer. Spring Eventing Bridge is pretty good mechanism for logging.
Could you give me another one advice for implementing some logic before starting the process?
For example, it is necessary to verify count of started instances (of same definition).
Every time someone try to start process (through cockpit, REST API or java api):
If count == #some number => the request to start the process must not be executed. return exception message
else => start new instance
it seems that an execution listener will also be suitable for this