Alert not using select filters during Bam Startup

(Doc ID 2306806.1)

Last updated on SEPTEMBER 19, 2017

Applies to:

Oracle BAM (Business Activity Monitoring) - Version 12.1.3.0.0 and later
Information in this document applies to any platform.

Symptoms

You have a simple DO with 3 columnns (col1, col2 and col3)
You create an alert based on col3 which should trigger when col3='false'

the CQ generated is:

CREATE QUERY TestAlert as SELECT BEAM_ID AS BEAM_ID, col3 AS col3 FROM TestDO
WHERE ( (col3="false" ) AND
(getQueryStartTime("TestStartupAlert.TestAlert")<DATAOBJECT_MODIFIED ) )

The problem is that during startup BAM is doing a full select without adding the WHERE statement:

select BEAM_ID as BEAM_ID, DATAOBJECT_CREATED as DATAOBJECT_CREATED,
DATAOBJECT_MODIFIED as DATAOBJECT_MODIFIED, col1 as col1, col2 as col2, col3
as col3, null as TRANSACTION_CID, null as TRANSACTION_TID , null, null, 0 as
PO_RELN_SOURCE_0_type from BEAM_VIEW_71 ) UNION ALL ( select null, null,
null, null, null, null, null, null, TRANSACTION_CID, TRANSACTION_TID, 1 as
PO_RELN_SOURCE_0_type from BEAM_TRANSACTION_CONTEXT) order by
PO_RELN_SOURCE_0_type asc


As the query is polling all the rows, this causes problems specially when the dataobject has a large # of rows which may lead to an OutOfMemory error or it may cause BAM to take too long to initialize

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms