SiteService.listSites provides a way to fetch all (or filtered) Alfresco sites
if the method doesn't allow to filter for property rrdathena:workflowNames, it is possible to iterate on listSites results and post-filter
For each site being returned, fetch the list of workflowNames, remove the workflow definition that have been un-deployed and save the property value again
Create an AOP Listener that is notified everytime a Workflow undeployment occurs.
To take inspiration from existing code, check class NodeRefPropertyMethodInterceptor.java and its configuration in node-services-context.xml
How to implement the logic:
SiteService.listSites
provides a way to fetch all (or filtered) Alfresco sitesrrdathena:workflowNames
, it is possible to iterate on listSites results and post-filter