Hi,
We have a use case where we generate about 30K workflows every quarter. We are creating workflows, using the org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity.createProcessInstance(businesskey) API.
We are currently using the default DBIdGenarator to generate process instance ids for the workflows. The workflows are getting created in a single thread in sequence.
What we notice is at times, we have stuck threads in the logs. This results in less no of workflows than anticipated. We tried using the StrongUUIDGenerator and this resulted in process instance ids as '674cabed-5a9e-11e7-ab04-0021f6000022'.
Please advise if we can get the UUIDGenerator to generate numbers instead of the above alpha numeric characters?
Is there a way we can increase the block size of the sequence in the DBIdGenerator class?
Please advise on the options, if any. I can provide more information, if required.
Thank you.
Jayashree.
Solved! Go to Solution.
> Please advise if we can get the UUIDGenerator to generate numbers instead of the above alpha numeric characters?
UUIDGenerator generates UUID. UUID (Java Platform SE 8 )
> Is there a way we can increase the block size of the sequence in the DBIdGenerator class?
You can set the block size of the DBIdGenerator by ProcessEngineConfiguration.setIdBlockSize.
ProcessEngineConfiguration (Activiti - Engine 5.22.0 API)
But, if you want rigor, you should make your original IdGenerator by overriding IdGenerator like db sequence.
And you set your original IdGenerator to ProcessEngineConfiguration by ProcessEngineConfigurationImpl.setIdGenerator.
> Please advise if we can get the UUIDGenerator to generate numbers instead of the above alpha numeric characters?
UUIDGenerator generates UUID. UUID (Java Platform SE 8 )
> Is there a way we can increase the block size of the sequence in the DBIdGenerator class?
You can set the block size of the DBIdGenerator by ProcessEngineConfiguration.setIdBlockSize.
ProcessEngineConfiguration (Activiti - Engine 5.22.0 API)
But, if you want rigor, you should make your original IdGenerator by overriding IdGenerator like db sequence.
And you set your original IdGenerator to ProcessEngineConfiguration by ProcessEngineConfigurationImpl.setIdGenerator.
Thank you daisuke. Do you know what idblocksize should I set to generate 30000 workflows? Do you know of any set guidelines.
Thank you!
I have no guidelines.
> Do you know what idblocksize should I set to generate 30000 workflows?
Regardless of the setting of idBlockSize, DBIdGenerator can generate 30000 id.
If you set idBlockSize, you change the number of times that DBIdGenerator acess table( act_ge_property next.dbid) to get next dbid.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.