Hi Will,
Thanks a lot for your reply.
1] Reason I am after stale workflows
Many times we see cq performance is slow and the cause is stale workflows.Being from a support background and new to CQ,
wanted to bring in some improvisation here, because if we are notified if such count is more than say 'x',
we can proactively take some steps from our end.I also completely agree that we should find out the cause for
workflows going stale rather than going in for this, but for now this implementation would be very much helpful.
2] "Instead of writing your own code I would suggest using the workflow maintenance jmx bean"
I did go through this(http://localhost:4502/system/console/jmx/com.adobe.granite.workflow:type=Maintenance) but not getting as to
how I can make use of this for my objective(i.e, notification to administrators when such count increases to more than 'x')
3] "If you want to simulate stale workflows the best way to do it"
Trying to understand few things - workflow sling job queue,delete the jobs that workflow is expecting.
4] "As for periodically making this call, you can use the sling scheduler for this"
Trying to understand this as it is not clear to me.
5] From the first paragraph what I could understand was that internally sling jobs run workflows. Trying to get a better understanding here.