Tuesday, July 10, 2012

BAM-01273: Active Data Cache unique constraint violation

There can be multiple reasons for this error. I had a situation in my BPM process where the workflow can take two possible flows. One for the valid payload where the process is fully automated (no human intervention) and another for the incorrect data which goes through a manual user review.

BAM was enabled on this BPM process. The BAM DO got created 'as expected' and the incorrect flow involving the user intervention worked like a charm and was pushing the process data into the BAM DO. Surprise sprung up when 'happy path' was execute. I could see no data in the BAM DO.

On analyzing, the BAM diagnostic logs reported the following error;


Exception: oracle.bam.adc.common.exceptions.UniqueConstraintViolationException: BAM-01273: Active Data Cache unique constraint violation at oracle.bam.adc.dse.oracle.OracleExceptionHelpers.getStorageException(OracleExceptionHelpers.java:135)
  at oracle.bam.adc.dse.oracle.OracleStorageEngine.insertDataSetRow(OracleStorageEngine.java:1216)
……………………………………………
……………………………………………
Caused by: java.sql.SQLIntegrityConstraintViolationException: SQLError(1) SQLState(23000) ORA-00001: unique constraint (PS4_ORABAM.SYS_C0015167) violated
……………………………………………
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

This error is very deceptive. Because, we have different workflow paths behaving differently apparently under the same BPM process.

Then I found the solution trying to assess the process flows and dehydration points. Since the 'happy path' flow was completely automated, I think the BPM process never dehydrated and hence didn't pass on the DO updates into BAM (for whatever reasons). There is a simple solution to this; Open the activities where the BAM DO values are set/updated in the BPM process and force the 'Sampling'. This way we are forcing the BPM process to update the BAM DO with the sampled values. There can be other reasons why you may get the same error on which I have blogged about here


No comments:

Post a Comment