Hi guys! I’m camunda newbie and I hope you can help me a little. My problem is that i want save logs from user operations. Like for example: creating, edit, delete new users or groups by another user.
I tried to extend HistoryEventHandler (https://docs.camunda.org/manual/7.5/user-guide/process-engine/history/#user-operation-log) and i can catch process events but not events from admin panel. Is there some solution for my problem? Thanks in advance.
Hi @milunas,
User/group changes are not forwarded as history events to history handlers. I doubt there is a straightforward solution to this. Here’s the rough way how to build this with internal API:
- Subclass
org.camunda.bpm.engine.impl.identity.db.DbIdentityServiceProvider
- Override methods like
#saveUser
and do your thing - Plug the custom identity service provider into the engine by setting the configuration property
identityProviderSessionFactory
to instance oforg.camunda.bpm.engine.impl.persistence.GenericManagerFactory
like here for the default factory: https://github.com/camunda/camunda-bpm-platform/blob/7.10.0-alpha5/engine/src/main/java/org/camunda/bpm/engine/impl/cfg/ProcessEngineConfigurationImpl.java#L1443
Cheers,
Thorben
2 Likes
Hi! Thank you for answer. Its great idea and it looks like it’s workings. But in meantime i tried extend this:
and this:
https://github.com/camunda/camunda-bpm-examples/tree/master/cockpit/request-interceptor
I extended authorization service but couldnt inject this in Process Engine Configuration.
And with second option - i dont know how to configure angularjs
But the second option definetly have potential, i can filter requests and log a lot informations, so i want to try this.
I will report my successes and failures.