Creating Enums Within A Script
Is it possible to create an enumerable type within a script for use by the methods in the script? Has anyone ever done this? I am working on a Pega Desktop Automation project using Pega Robotics Studio version 8.0 SP1.
The automation checks the message received on line 24 of a text adapter screen to determine the status of the processed transaction. I am capturing the message to pass to the script to determine the status to record in a SQL Server table. There are currently three known statuses, Transaction Completed, Update Effective Date not Greater Than Current Effective Date (for an add transaction), and Unknown. When an unknown status is returned, we will be adding values to the enumerable type.
When the Update Effective Date not Greater Than Current Effective Date message is received for an add transaction, the database record is marked as a change transaction and then processed a second time on the change change screen.
I am attempting to follow the Type design guidelines for Enum Design. Specifically "✔️ DO favor using an enum instead of static constants."