Unable to Check in the File With Error 'The File(s) Deleted or Replaced From Outside This Object Cannot Be Checked In' After Getting the Event PX Error (Doc ID 2237313.1)

Last updated on JULY 18, 2017

Applies to:

Oracle Agile PLM Framework - Version 9.3.5.0 and later
Information in this document applies to any platform.

Symptoms

Implemented a File Checkin Event PX that will check the file name being checked in so that file check in will fail with error if the file name is different from the original file name.
If the user attempts to replace a file with different file name while checkin, event PX will return an error which is expected, and user cannot check in the file.
However, in the File Folder, can see the file is replaced at the pending version.
So if the user retries to checkin the file with the correct name, below error is returned and unable to checkin the file:

Error

The file(s) deleted or replaced from outside this object cannot be checked in

Steps to Reproduce

  1. Create a jar file with below source code and copy to %Agile_Home%\integration\sdk\extensions  
  2. Login to Java Client as admin user, goto Admin tab > Settings > Event Management > Events, and create below Event:

    Event Type: Check In Files
    Name: Item_CheckInFiles
    Object Type: Items

  3. Goto Admin tab > Settings > Event Management > Event Handlers, and create below Event Handler:

    Handler Type: Java PX
    Name: ItemCheckInFilesPreHandler
    Event Action: sample.event.ItemCheckInFilesPreHandler

  4. Goto Admin tab > Settings > Event Management > Event Subscribers, and create below Event Subscriber:

    Name: ItemCheckInFilesPreEvent
    Enabled: Yes
    Event: Item_CheckInFiles
    Event Handler: ItemCheckInFilesPreHandler
    Trigger Tpe: Pre
    Execution Mode: Synchronous
    Error Handling Rule: Stop

  5. Login to Web Client
  6. Create an item, goto Attachments tab, and add an attachment file
  7. Checkout the file
  8. Checkin a file with a different name with the checkout file
    -> Gets error. This is expected
  9. Checkin a file with the same name with the checkout file
    -> Gets error. The file(s) deleted or replaced from outside this object cannot be checked in. This is not expected
  10. Open File Folder of the attachment. On the pending Version [2], can see the file which was attempted to check in on step 8 is added.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms