I know within the Workflow interface I can perform a search on an active worklows that have been running for x amount of time. Is there any way to have Workflow send me a daily email of that same search?
Question
Question
Daily Workflow Report of Instances Running Longer than X Amount of Time
Answer
There is no built-in report, but you can make one using the existing activities against Workflow's SQL database.
This workflow counts the number of instances started more than 30 days ago.
SELECT count(*) FROM [search_activity] WHERE activity_name IN (SELECT iname FROM workflow) AND [start_time] <= ?
If results are found, it gets the individual results and creates a table of URLs to the WF Web Designer and emails it out.
SELECT[activity_name] ,[context_id] ,[start_time] FROM [search_activity] WHERE activity_name IN (SELECT iname FROM workflow) AND close_status = 0 AND [start_time] <= ?
A sample Word document is attached. The URL for Workflow's web Designer looks like this: http://SERVERNAME:80/WF/#/Search/SERVERNAME/Instance/Load/WORKFLOWID/Workflow
The query gets the WF ID and the Word document formats it by adding the rest of the URL. Or you can modify the query to build the URL directly.
Replies
Not at this time.
This is required even for us. Large number of workflow instances are getting stuck. The same instances get processed on re-triggering. The retry parameters set are not working as expected
Laserfiche team, is this an option now with 10.2? Thanks
There is no built-in report, but you can make one using the existing activities against Workflow's SQL database.
This workflow counts the number of instances started more than 30 days ago.
SELECT count(*) FROM [search_activity] WHERE activity_name IN (SELECT iname FROM workflow) AND [start_time] <= ?
If results are found, it gets the individual results and creates a table of URLs to the WF Web Designer and emails it out.
SELECT[activity_name] ,[context_id] ,[start_time] FROM [search_activity] WHERE activity_name IN (SELECT iname FROM workflow) AND close_status = 0 AND [start_time] <= ?
A sample Word document is attached. The URL for Workflow's web Designer looks like this: http://SERVERNAME:80/WF/#/Search/SERVERNAME/Instance/Load/WORKFLOWID/Workflow
The query gets the WF ID and the Word document formats it by adding the rest of the URL. Or you can modify the query to build the URL directly.