Checking if application generation is active for certain Event.
Generally the CA Workload Automation server checks if an application generation is active or not from the CAWA database ESP_WSS_APPL table by running the following SQL query -
SELECT COUNT(*) FROM ESP_WSS_APPL WHERE EVENT_NAME ='<eventname>' AND STATUS= 1;
If there is any record satisfying this query and 'Do not trigger if active' check box is enabled in the application properties, the CAWA Server assumes that there is some previous application generation active and does not trigger the Event to run the next generation.
So you can run the query against the database CA Workload Automation server uses with the specific Event name to check if there are any records existing and active.