Striim 3.9.4 / 3.9.5 documentation

Writing exceptions to a WActionStore

Exceptions (see Handling exceptions) are sent to Global.exceptionsStream and written to Striim's server log (Reading log files). If useful, you may store exceptions in a WActionStore using an application such as this:

CREATE APPLICATION StoreExceptions;

CREATE TYPE myExceptionType (
  entityName java.lang.String,
  className java.lang.String,
  message java.lang.String);

CREATE STREAM myExceptionsStream OF myExceptionType;

CREATE  CQ selectExceptions 
INSERT INTO myExceptionsStream
SELECT entityName,
  className,
  message
FROM Global.exceptionsStream;

CREATE WACTIONSTORE ExceptionsWAS
CONTEXT OF myExceptionType
EVENT TYPES (myExceptionType KEY (entityId));

CREATE CQ stream2WActionStore
  INSERT INTO ExceptionsWAS
  SELECT * from myExceptionsStream;

END APPLICATION StoreExceptions;

To store only certain events, add an appropriate WHERE clause to the CQ.