문제

It seems that a common (centralized) Id generator is used to generate Ids for JBPM tables. Hence the task (case Ids) are often not in sequence.

Our requirement is to get these task (case) Ids in sequence and I know it can be achieved if I can control / customize the task Id generation.

도움이 되었습니까?

해결책

Many of the jBPM tables use a single common sequence, HIBERNATE_SEQUENCE. In addition, some of them reserve more than one sequence at a time to assign.

Given this, you will definitely not get sequential sequence IDs - I'm not certain why this is a requirement though. In addition, even if you were getting sequential sequences and there was a rollback, the sequence would have already been used and would then be lost.

jBPM6 has slightly more specific tables for sequences, but you'll still run into issues with roll-backs not generating sequential sequences.

You'll have to modify the source code yourself to change the IDs from being autogenerated to being manually populated - honestly though, it will probably be more effort than it's worth.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top