How to prevent wrong case index number on new process ?

1
0
-1

Hello,

I'm actually with bonita 5.2.

I've actually a strange behavior on bonita about case index number.

My actual case index number for active workflow is : #28 and i need to purge every weeks the history.

But, i have some old wf, always open named, by example : WF_TEST_MYNEWPROCESS - #30.
I have to keep it because, it's not finished and still opened and needed to be complete by people.

When i try to start another workflow, the #29 is ok, but starting a second wf name #30 will be blocked and I see why.

So, I retry once more and bonita decided to take #31 as new index for this case.

Is there any ways to prevent this kind of behavior ? Like reindexing correctly the cases index number ?

Thank you.

Comments

Submitted by bonitafree on Fri, 03/03/2017 - 11:53

I saw something since Bonita 6.2 documentation about Performance Tuning > Sequence Manager. Is this correct the index case generation ?

2 answers

1
0
-1

Hi Lionel, thanks for your answer and the explanation.

I edited to try my to explain specific example :

List of bonita processes on UserXp with case.indexnumber :

WF_BONITA_PROCESS #4 (archived)
WF_BONITA_PROCESS #3 (archived)
WF_BONITA_PROCESS #2 (opened)
WF_BONITA_PROCESS #1 (archived)

Considering that i'll delete only archived process #1, bonita will reset id case to 1.

I could create the first one but the second process will be in error.

Here how i load my bonita archive (WF_BONITA_PROCESS) with version archive (1.0)

ProcessDefinitionUUID processDefinitionUUID = new ProcessDefinitionUUID(businessArchive,
versionBusinessArchive);
instanceUUID = runtimeAPI.instantiateProcess(processDefinitionUUID);

There is any way to set to my instanceUUid a specific number case ?

I donno wich version of bonita will correct this problem.

n.b : just to remind you im actually in bonita 5.2 and not 6.2 (where i saw this Sequence Manager thing in doc)

1
0
-1

Hi,

yes the sequence manager can be modified to control the range of id reserved by the engine at the startup. This way, each time the engine needs to insert a new rows, the id is already reserved and available in memory. This is good practice for performance. That being said, the mininum you can set is an increment of 1. I don't think you can specify the starting number. A general rule is to consider the case id as an internal reference and don't try to use it for external communication. You should better have your own reference either in a business variable or a process variable.

Cheers

Testing
Notifications