OnStoredInstance not being called if Instance existed in the past

I have a Lua script with an OnStoredInstance handler.

Here is the behavior I observe:

  1. Start Orthanc

  2. DICOM push an instance to Orthanc

  3. script is called

  4. delete instance from Orthanc

  5. push that same instance again

  6. script is not called

  7. restart Orthanc

  8. push that same instance again

  9. script is called

It appears to me that Orthanc is too aggressively caching the instance id – the script is not getting called even if the instance has been deleted … until Orthanc is restarted.

This is in 1.8.2.

Daniel

Please post a complete minimal working example (configuration files, Lua script, command lines) in order for other people to be able to independently reproduce your issue:
https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example

Sébastien-

I found the problem (while creating that minimal example). I hadn’t wrapped my script in if origin[‘RequestOrigin’] ~= ‘Lua’.