<ROOT>
 <APPS_INITIALIZE_DATA>
  <USER_NAME>ENGINATICS</USER_NAME>
  <RESPONSIBILITY_KEY>SYSTEM_ADMINISTRATOR</RESPONSIBILITY_KEY>
  <APPLICATION_SHORT_NAME>SYSADMIN</APPLICATION_SHORT_NAME>
 </APPS_INITIALIZE_DATA>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: WF Queue Backlog -->
 <REPORTS_ROW>
  <GUID>F02571BACAC64B1A9FAE502607A2336F</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>select
x.queue_table,
x.corrid correlation_id,
decode(x.state,0,&apos;Ready&apos;,1,&apos;Waiting&apos;,2,&apos;Processed&apos;,3,&apos;Expired&apos;) state,
x.message_count,
xxen_util.client_time(x.oldest_message) oldest_message,
xxen_util.time((sysdate-x.oldest_message)*86400) oldest_message_age,
xxen_util.client_time(x.newest_message) newest_message
from
(
select &apos;WF_DEFERRED&apos; queue_table, wd.corrid, wd.state, count(*) message_count, cast(min(wd.enq_time) as date) oldest_message, cast(max(wd.enq_time) as date) newest_message from wf_deferred wd group by wd.corrid, wd.state union all
select &apos;WF_DEFERRED_TABLE_M&apos; queue_table, wdtm.corrid, wdtm.state, count(*) message_count, cast(min(wdtm.enq_time) as date) oldest_message, cast(max(wdtm.enq_time) as date) newest_message from wf_deferred_table_m wdtm group by wdtm.corrid, wdtm.state union all
select &apos;WF_ERROR&apos; queue_table, we.corrid, we.state, count(*) message_count, cast(min(we.enq_time) as date) oldest_message, cast(max(we.enq_time) as date) newest_message from wf_error we group by we.corrid, we.state union all
select &apos;WF_JAVA_DEFERRED&apos; queue_table, wjd.corrid, wjd.state, count(*) message_count, cast(min(wjd.enq_time) as date) oldest_message, cast(max(wjd.enq_time) as date) newest_message from wf_java_deferred wjd group by wjd.corrid, wjd.state union all
select &apos;WF_JAVA_ERROR&apos; queue_table, wje.corrid, wje.state, count(*) message_count, cast(min(wje.enq_time) as date) oldest_message, cast(max(wje.enq_time) as date) newest_message from wf_java_error wje group by wje.corrid, wje.state union all
select &apos;WF_NOTIFICATION_OUT&apos; queue_table, wno.corrid, wno.state, count(*) message_count, cast(min(wno.enq_time) as date) oldest_message, cast(max(wno.enq_time) as date) newest_message from wf_notification_out wno group by wno.corrid, wno.state union all
select &apos;WF_NOTIFICATION_IN&apos; queue_table, wni.corrid, wni.state, count(*) message_count, cast(min(wni.enq_time) as date) oldest_message, cast(max(wni.enq_time) as date) newest_message from wf_notification_in wni group by wni.corrid, wni.state union all
select &apos;WF_INBOUND_TABLE&apos; queue_table, wit.corrid, wit.state, count(*) message_count, cast(min(wit.enq_time) as date) oldest_message, cast(max(wit.enq_time) as date) newest_message from wf_inbound_table wit group by wit.corrid, wit.state union all
select &apos;WF_OUTBOUND_TABLE&apos; queue_table, wot.corrid, wot.state, count(*) message_count, cast(min(wot.enq_time) as date) oldest_message, cast(max(wot.enq_time) as date) newest_message from wf_outbound_table wot group by wot.corrid, wot.state
) x
where
1=1
order by
x.message_count desc</SQL_TEXT>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>WF Queue Backlog</REPORT_NAME>
    <DESCRIPTION>Number of messages per Workflow Business Event System queue table, correlation id and state, with the age of the oldest message.

A large number of Ready messages with an old Oldest Message shows that the agent listener, notification mailer or Workflow Background Process serving the queue is down or cannot keep up. The correlation id contains the business event or notification message name, and for WF_DEFERRED_TABLE_M the item type processed by the Workflow Background Process.</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>Enginatics</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>1=1</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>x.state&lt;&gt;2</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV</PARAMETER_TYPE_DSP>
    <LOV_NAME>Yes</LOV_NAME>
    <LOV_GUID>8E2FF36EDEA679D2E0530100007F1FF2</LOV_GUID>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;Y&apos; id, xxen_util.meaning(&apos;Y&apos;,&apos;YES_NO&apos;,0) value, null description from dual</LOV_QUERY_DSP>
    <DEFAULT_VALUE>Y</DEFAULT_VALUE>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Exclude Processed</PARAMETER_NAME>
      <DESCRIPTION>Exclude messages that were processed and are only retained in the queue</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>x.message_count&gt;=:message_count_from</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Number</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Message Count From</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>x.oldest_message&lt;=sysdate-:oldest_message_hours/24</SQL_TEXT>
    <PARAMETER_TYPE_DSP>Number</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Oldest Message Hours From</PARAMETER_NAME>
      <DESCRIPTION>Show only queues whose oldest message has been waiting at least this number of hours</DESCRIPTION>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>1=1</ANCHOR>
    <SQL_TEXT>x.queue_table=:queue_table</SQL_TEXT>
    <PARAMETER_TYPE_DSP>LOV custom</PARAMETER_TYPE_DSP>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select &apos;WF_DEFERRED&apos; value, &apos;Deferred business event subscriptions&apos; description from dual union all
select &apos;WF_DEFERRED_TABLE_M&apos; value, &apos;Deferred workflow activities&apos; description from dual union all
select &apos;WF_ERROR&apos; value, &apos;Business event errors&apos; description from dual union all
select &apos;WF_JAVA_DEFERRED&apos; value, &apos;Deferred Java business event subscriptions&apos; description from dual union all
select &apos;WF_JAVA_ERROR&apos; value, &apos;Java business event errors&apos; description from dual union all
select &apos;WF_NOTIFICATION_OUT&apos; value, &apos;Outbound notifications for the mailer&apos; description from dual union all
select &apos;WF_NOTIFICATION_IN&apos; value, &apos;Inbound notification responses&apos; description from dual union all
select &apos;WF_INBOUND_TABLE&apos; value, &apos;Inbound business events&apos; description from dual union all
select &apos;WF_OUTBOUND_TABLE&apos; value, &apos;Outbound business events&apos; description from dual</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Queue Table</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
