Supporting Workflows

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.

Workflow Chear Sheet
Some useful queries:

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’))
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: