How can i avoid Transient excpetion error? How to remove child from parent without error?



Im having serious issues with this exception, I have a business data object that has a few thousand children. Normally this would be a simple task, find the parent-child connection row, delete it and delete the child object. This doesnt work so well in this case, because of the order column, of course the Bonita does everything in the background, but if the parent has to many children objects, then it takes quite a long time to put the parent in a variable, and then remove the child object. And if i try to do the same process to fast, then one of the two processes will fail with transient exception.

My process does this:

Put child object in business variable -> get parent object by child object pid -> remove child object from parents list -> delete child object

This takes almost half a minute for me, the parent has about 10 000 child objects, maybe a little more. The relation ship is aggregation and i only load objects when needed.

If i start two of these processes within 5 seconds it is a 100% fail for one of them (both process loads the same parent object)

Is there a way to avoid this error? Is there a way to check if object is available or not? How should i remove these child object from database?

Best Regards


No answers yet.