Hey
What would be the best approach to expose a service / function for nodes and edges to perform logging via listeners?
I’d like to be able to put an expression such ${log('hello')}
on nodes listeners and edges which will call some method that will just perform the logging via slf4j,
I’m using the standard Tomcat bundle,
Thanks.
Hi @Asaf_Shakarzy,
maybe you could just add this log level to your configuration:
name="org.camunda.bpm.engine.bpmn.behavior" level="debug"
Hope this helps,
Ingo
I want to have my own logs that are more business rather dump technical transitions details
@Ingo_Richtsmeier
yea i came across Spring but I guess the standard bundle comes without Spring setup and I was finding it too complicated to setup just for a single log bean.
I this or CDI are the only ways to expose a bean?
Thanks
They are the easiest one. You can find a configuration for spring in a shared engine in the getting started guide: https://docs.camunda.org/get-started/spring/shared-process-engine/. Have a look into the other chapters to understand, what’s going on in the project.
A more theoretical option is to configure the expressionManager
in the engine to the org.camunda.bpm.engine.test.mock.MockExpressionManager
. Then you can use Mocks.register(key, value)
to add certain values (or classes). But this is invented for unit tests and not for production environment.
Cheers, Ingo
Pity there’s no simple way to bind a function to the EL resolver,
Alright then , thanks a lot Ingo !
for those who’s seeking such solution,
I found an easy way (without going through dependency injection magics) that works both for nodes & edges by using a Java Class listener that performs the Logging while messages are set by field injection.