ROES Server - Listeners - Delete Old Orders

ROES Support Knowledgebase

Delete Old Orders Using a ROES Server Listener

Use this article to configure a ROES Server listener that runs the Delete Orders by Age script and removes old orders and associated files.

Product: ROES Server Category: Listeners / Scripts Audience: Lab / Support Article ID: 75
Common need
A lab wants ROES Server to automatically delete old orders and related files after a configured number of months and days.

Overview

The script in this listener is triggered when ROES Server is launched. It uses configured months and days values to determine which orders and associated files are old enough to be deleted.

Each day at midnight, the script is executed again. Images, attachments, client-generated images, and report files may be included for deletion when an order reaches the configured age.

Delete Old Orders listener setup in ROES Server
Example listener configured to delete old orders by age.
If this image does not display, open it directly: KB-DeleteOldOrders-Listener1.png

Important Note

Review the script settings carefully before enabling it. Once configured, the listener can delete orders and selected associated files automatically based on age.

Set Up the Delete Old Orders Listener

1

Open the Listeners tab

Go to the Listeners tab in ROES Server.

2

Add a new listener

Use the + button in the lower-left corner to add a new listener.

3

Name the listener

Give the listener a name that clearly identifies what it does, such as Delete Old Orders.

4

Set the event name

In the Listen for events named: field, enter:

ON_LOCAL_LAUNCH
5

Download the script from ROES-U

Go to the ROES Server area on ROES-U.com, search for Scripts, select ROES Server Scripts, and use the Delete Orders by Age link to download the script file.

6

Copy the script contents

Open the script file in a text editor and copy the full contents.

7

Paste the script into the listener

Paste the copied script contents into the script section of the listener.

8

Modify the script settings

Modify the areas of the script that define which files should be deleted and the number of months and days used to determine order age.

9

Relaunch ROES Server

Close ROES Server and relaunch it to save your work and trigger the listener setup.

Files That May Be Included for Deletion

  • Images
  • Attachments
  • Client-generated images
  • Reports files

Expected Result

When ROES Server launches, the listener should be active. The script should run at launch and then each day at midnight, deleting orders and selected associated files once they reach the configured age.

Helpful Link

Escalation Notes

  • Confirm the listener is on the Listeners tab and listens for ON_LOCAL_LAUNCH.
  • Confirm the complete script contents were pasted into the listener.
  • Confirm the script was modified for the intended file types and the correct months/days age threshold.
  • Confirm ROES Server was closed and relaunched after adding the listener.
  • Before enabling automated deletion, confirm the lab understands which order-related files will be removed.
Suggested keywords: Delete Old Orders, ROES Server, listener, ON_LOCAL_LAUNCH, Delete Orders by Age, script, midnight, cleanup, images, attachments, reports

Article Details

Article ID:
75
Category:
Views:
157