Skip to main content
Question

Mass deleletion of obsolete documents

  • Sep 30, 2026 10:04 AM UTC
  • 1 reply
  • 47 views

Forum|alt.badge.img+2

All, 

Overtime, we build up a considerable amounts of obsolete documents in our (currently) IFS Cloud environment. With considerable, I mean 1.200.000+ documents. For storage considerations, we want to delete all documents marked as obsolete. Documents got obsolete over the years, meaning that some documents became obsolete yesterday, others are obsolete since 2019. 

I learned that there is this parameter, DAYS_EXPIRED, under Document Management>Basic Data>Document Class Management, that I can set to indicate how long obsolete documents should be kept before being purged. 

These are my questions:

First question Not sure how a value for DAYS_EXPIRED is treated.
If I were to specify 10 as a value, does that

  • remove my total population of obsolete documents, starting in 10 days (as in: the clock starts ticking now for both new and existing obsolete documents, wait 10 days and then selection and removing of all obsolete documents takes place
  • select all documents that are obsolete for at least 10 days, based on the modified/change date of the obsoleteness of that document and removes that selection (meaning I get to keep all documents that turned obsolete in the past ten days)
  • other logic? 

So, if it works as described in the second option, and I am able to specify e.g. 3650 as a value for DAYS_EXPIRED, I am expecting that only documents that have been in obsolete state for 10 years are removed (and explicitly not selecting documents that do exist for 11 years but became obsolete only one year ago). 

Give the volume, I expect that I have to break up the population in chunks, since a delete of 1.2 million documents in a single run seems undesirable / unfeasible. 

Second question is how purging takes place.  Apart for setting the parameter, do I have to configure anything else. Does IFS schedule a background job for this? If so, is there a max duration for such a job (can imagine, it may run for days). Reason for asking is that I would like to monitor somehow execution of the purge, and for that, I must know where to look. 

 

Hoping anyone can help me with this one. 

Cheers 

Robert 

 

 

1 reply

Dilini Arandara
Superhero (Employee)
Forum|alt.badge.img+13

The DAYS_EXPIRED parameter can be configured with a numeric value (for example, 3650 days) to define the retention period for obsolete document revisions.

This means that document revisions that have remained in Obsolete status for at least the specified number of days become "eligible for purging".

However, configuring DAYS_EXPIRED does not automatically initiate the purge process. A separate process, such as a scheduled background job or customization, would be required to periodically identify and delete expired obsolete document revisions.

1. Understanding the expiration calculation

For further clarification, please navigate to:

Document Revision → Development tab

Review the field descriptions for the following fields:

Days to Expiration:

"The number of days from when a document is set to the Obsolete status until the Expiration Days counter reaches zero. The value in this field serves as a safety margin for deleting documents, which allows you, for example, to make a background job that deletes all expired documents. This field is currently for informational purposes only and affects nothing else in the system."

Remaining Days:

"The document expires after it has been obsolete for a specified number of days, according to the value entered in the Days to Expiration field. This field shows the number of days until the revision expires. When the revision has expired, this number is negative. The default value for the Days to Expiration field can be changed in the Document Default Values page. This field is for informational purposes only and affects nothing else in the system."

These descriptions confirm that the expiration period is calculated based on when the document revision became obsolete, rather than when the default value was configured.

For example, if Days to Expiration = 3650, a document revision that became obsolete one year ago should not yet be considered expired, even if the document itself was created more than ten years ago.

2. Impact on existing document revisions

Please note that configuring DAYS_EXPIRED now in Document Default Values does not automatically update the expiration values of existing document revisions.

The configured default will apply to newly created document revisions going forward.

Therefore, for your existing population of more than 1.2 million obsolete documents, simply configuring the default value will not provide a complete solution for identifying and purging the historical records.

3. Possible approach for existing document revisions

Considering the volume of existing documents, you may evaluate the following approach. However, this is a proposed technical approach, not a confirmed or supported standard procedure, and its feasibility must be validated before implementation.

Step 1: Configure the default expiration value


Set the required DAYS_EXPIRED value in Document Default Values.

If document defaults have already been copied to individual document classes, please also verify whether the corresponding values need to be maintained under:

Document Class Management → Document Default Values

Step 2: Evaluate updating existing document revisions

Currently, the Days to Expiration field cannot be manually modified from the client for obsolete document revisions.

Therefore, you may need to evaluate whether the required values can be populated through a controlled script or data correction.

For existing obsolete revisions, the proposed approach would be to:

  • Set Days to Expiration to the required retention period, such as 3650 days.
  • Use the Date Obsoleted, available under the General tab of Document Revision, to determine the applicable expiration date.
  • Evaluate whether Remaining Days needs to be updated or is calculated automatically by the application.


Conceptually:

Remaining Days = Days to Expiration − Days elapsed since Date Obsoleted

For existing revisions that are not yet obsolete, you may also evaluate whether the Days to Expiration value needs to be populated.

Please note that I cannot currently confirm whether these fields can be updated directly through a script or whether IFS provides a supported API for this purpose.

Any such modification should be reviewed and approved by the appropriate technical team before execution

4. Purging expired document revisions

Once the expiration information has been correctly established, a separate process would be required to identify and purge eligible obsolete document revisions.

Conceptually, the selection criteria would be:

  • Document Revision Status = Obsolete
  • Remaining Days ≤ 0


However, the actual deletion process must use an appropriate supported method to ensure that document metadata, associated files, and related references are handled correctly.

Given the volume of more than 1.2 million documents, we strongly recommend processing the eligible revisions in manageable batches, rather than attempting to delete the entire population in a single execution.

The batch size, execution frequency, monitoring mechanism, and any processing limitations would need to be determined based on the technical solution selected.

5. Ongoing maintenance

If a supported one-time correction can be implemented for the existing document revisions, the historical data preparation would not need to be repeated.

Going forward:

  • Newly created document revisions should receive the configured expiration default.
  • The expiration calculation should continue to reflect the time elapsed since each revision became obsolete.
  • A separate scheduled process would be required to periodically identify and purge expired obsolete revisions.


Depending on your business requirements and document volumes, the purge process could potentially be scheduled monthly, quarterly, or annually.

However, the feasibility of this approach and the supported execution mechanism would need to be confirmed before implementation.

In summary:

  1. DAYS_EXPIRED defines expiration eligibility but does not automatically delete documents.
  2. The expiration period is based on when the document revision became obsolete.
  3. Updating the default value does not automatically update existing revisions.
  4. For the existing historical document population, a separate technical solution may be required to establish expiration values and perform the purge.
  5. Any proposed script, data correction, or automated deletion process must be technically validated before implementation, particularly considering the volume of documents involved.

We recommend reviewing the proposed approach with your technical or Consulting resources to determine whether it can be implemented through supported IFS functionality or whether a separate technical solution is required.

Also check: 

 

https://community.ifs.com/document%2Dmanagement%2Ddocman%2D248/docman%2Ddocuments%2Dcleanup%2Din%2Dapps%2D9%2D46503

 



Best regards,
Dilini