ROES Server - Listeners - Delete Old Orders
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.
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.
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
Open the Listeners tab
Go to the Listeners tab in ROES Server.
Add a new listener
Use the + button in the lower-left corner to add a new listener.
Name the listener
Give the listener a name that clearly identifies what it does, such as Delete Old Orders.
Set the event name
In the Listen for events named: field, enter:
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.
Copy the script contents
Open the script file in a text editor and copy the full contents.
Paste the script into the listener
Paste the copied script contents into the script section of the listener.
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.
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
- ROES-U ROES Server section
Use this page to search for Scripts and locate ROES Server Scripts.
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.