Activiti UUIDGenerator can generate a number?

cancel
Showing results for 
Search instead for 
Did you mean: 
gjaya26
Member II

Activiti UUIDGenerator can generate a number?

Jump to solution

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.

1 Solution

Accepted Solutions
daisuke-yoshimo
Senior Member

Re: Activiti UUIDGenerator can generate a number?

Jump 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.

View solution in original post

3 Replies
daisuke-yoshimo
Senior Member

Re: Activiti UUIDGenerator can generate a number?

Jump 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.

gjaya26
Member II

Re: Activiti UUIDGenerator can generate a number?

Jump to solution

Thank you daisuke. Do you know what idblocksize should I set to generate 30000 workflows? Do you know of any set guidelines.

Thank you!

daisuke-yoshimo
Senior Member

Re: Activiti UUIDGenerator can generate a number?

Jump to solution

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.

Activiti User Guide