We're trying to locate an event that can be used to trigger a quick logging automation when a stop/shutdown/terminate command is received by the runtime.
This is for auditing purposes, we currently log individual items processed by the bot, and the bot sessions. On the allprojectsstarted event, we add a start entry in the bot session table. When the bot is exiting (at the end of a robot manager scheduled session, or by triggering it through robot manager), we want it to add the shutdown timestamp to the bot session table.
Is there any way to achieve this, or can we only audit cases (robot activities) processed, not the bot execution session itself?
There is an event that fires when Runtime is exited from the tray icon. This event is not triggered by shutting down externally however. As far as I can tell, there is no way to have an automation run when it is being shut down. You might be able to achieve this with an external application running something when the workstation is being logged-off. You should also be able to write something in the Pega Platform application once the bot is logged-off that writes the record to your database.