Managing short-lived stocks - looking for best-practices!

Hi everyone,

I wonder if there is a perfect way to manage short-lived stocks in openBIS. The specific example relates to commercial chemicals: a new batch is added to the inventory and referenced as a parent in experiments. When the batch is depleted, it is removed from the inventory for inventory management purposes. Unfortunately, each time this is done, all references in the experiments are lost, even when NOT selecting
Delete also all descendant object(s) (i.e. children, grand children etc.) including their data sets, if they exist.
for deletion. Am I overlooking something? Is there a better way? Or is this simply not intended?

Thanks for help!

Greetings,
Volker

Dear Volker,

indeed if you delete an entry, all connections to it are lost. The way to handle this is to add a boolean field to your chemical, called for example “Available”, where you can mark if the chemical is available or not. This will allow you to search only on available chemicals, if needed.

Dear Caterina,

That is more of a workaround, but there is still the question: What is the intention of the checkbox Delete also all descendant object(s) (i.e., children, grand children etc.) including their data sets, if they exist. since keeping it unchecked does not save any object-links??
The need to track batches is to see, in hindsight, whether a different batch affected the product somehow.
I have to keep empty chemicals in the system as it is now. That would work but will create a lot of objects over time.

Thanks and regards,
Volker

Dear Volker,

the option to " Delete also all descendant object(s) (i.e., children, grand children etc.) including their data sets, if they exist does exactly what it says. Let’s assume you have the following situation: Object A → Object B (dataset 1)-> Object C, where Object A is parent of Object B and Object B is parent on Object C. If you select to delete Object A, you will be presented with the option above. If you select to delete the descendants, Object A, Object B (with dataset 1) and Object C will all be deleted in one transaction. If you do not select this option, only Object A is deleted. Object B and Object C are preserved. However, in Object B you will no longer have the connection to Object A, if this has been deleted. It is not possible to keep the connection to something that does not exist any more in the database.
I hope this helps.

Ah, it is pretty obvious.
Sorry for my misunderstanding, and thanks for the explanation.