I want to generate custom processInstanceId and TaksId for our workflows. Depending upon the deployed workflows, we keep custom prefix for each and assosciate custom uuid with it. Similarly we want to generate custom uuid for individual tasks also. Can you guys suggest the correct way to override it.
I have seen the question: Can I generator Id (task or processInstance) by special rule?. But I didn’t uderstood what are the steps for implementing custom DbSqlSession. How I can implement it’s custom implementation(like where I should tell my custom implemented class. Can I add it in SpringProcessEngineConfiguration like Delegates and event listeners?). What are steps need to make flowable understand about my custom implementation?
I am really sorry joram, for directly mentioning…
I have figured that out(for generating id), but my current problem is that to follow different rules for generating processId and taskId. Even if I implement custom implementation for an IdGenerator, it is going to generate id for processInstance as well as taskId with a common implementation…right?
From the question previously mentioned, I understood that overriding DbSqlSession.insert(Entity entity) give me the flexibility to generate different kind of Id for process instance and task. But still I didn’t understood how we can set that in engine config?
That’s correct, the IdGenerator needs to generate ids only, but doesn’t know about the final entity.
You can do that by setting a customSessionFactory on the engine configuration, returning DbSqlSessionc.class to have your version ‘win’ over the default one.
None that I can think of right now. Having fully customised id’s is not something that’s requested often.