Supporting Workflows
October 29, 2007 Leave a comment
The success of a production deployment can be analyzed with the amount of support which goes into maintaining and/or trouble-shooting the application. One of the challenges in a production release tends to do with the workflows. Several times in the past, I had to run variety of queries to identify various combination of results relating to workflows. In the process I developed this cheat sheet for myself which gives a quick overview of the workflows and what you have to query for.
List of component objects in user inbox
- select r_object_id from dm_sysobject where r_object_id in (select r_component_id from dmi_package where r_workflow_id in (select router_id from dmi_queue_item where name=”))
List of inbox items for a given task
- select count(name), name FROM dmi_queue_item WHERE task_name = ‘ and delete_flag=0 AND (task_state = ‘dormant’ OR task_state = ‘acquired’ OR task_state = ‘paused’ OR task_state = ‘ready’) AND (router_id != ‘0000000000000000’ AND router_id IS NOT NULLSTRING AND NOT (a_operations = ‘queue’)) group by name order by name
List of WF’s in a user inbox
- select * from dmi_queue_item WHERE name=” AND delete_flag=0 AND (task_state = ‘dormant’ OR task_state = ‘acquired’ OR task_state = ‘paused’ OR task_state = ‘ready’) AND (router_id != ‘0000000000000000’ AND router_id IS NOT NULLSTRING AND NOT (a_operations = ‘queue’)) UNION ALL SELECT * FROM dmi_queue_item WHERE name IN (SELECT ALL group_name FROM dm_group WHERE ANY i_all_users_names = ”) AND delete_flag=0 AND (task_state = ‘dormant’ OR task_state = ‘acquired’ OR task_state = ‘paused’ OR task_state = ‘ready’) AND (router_id != ‘0000000000000000’ AND router_id IS NOT NULLSTRING AND NOT (a_operations = ‘queue’))