Processes are not running or take a long time to run. "Missmatched Pas Conditions" error

book

Article ID: 198348

calendar_today

Updated On:

Products

Clarity PPM SaaS

Issue/Introduction

Production processes have not been running for over an hour.  This is affecting production data to be updated correctly.  

Cause

Corrupted data in the BPM_PROCESSES table where process_engine_id is NULL

Environment

Release : 15.8

Component : CA PPM SAAS BUSINESS PROCESS MANAGEMENT

Resolution

Please reference defect DE57433 which is to provide the process engine logic to better handle this error condition.
To look for the bad data to clear, run the following query:


-- For SaaS, please open a support case so Support can review and advise
SELECT * FROM
BPM_RUN_PROCESSES
where process_engine_id is null
AND STATUS_CODE NOT IN ('BPM_PIS_DONE', 'BPM_PIS_ABORTED');

To correct the issue, remove this bad data:
-- Please have your DBA or Broadcom backup this table prior
-- For SaaS, please open a support case so Support can review and advise

DELETE FROM
BPM_RUN_PROCESSES
where process_engine_id is null
AND STATUS_CODE NOT IN ('BPM_PIS_DONE', 'BPM_PIS_ABORTED');

 

After clearing the orphan data, a BG restart is required

Additional Information

SUMMARY: All processes get stuck or extremely slow when there is bad data in BPM_RUN_PROCESSES

STEPS TO REPRODUCE: 
1- Restart the bg container so it gets a different container name
    ---   OR  ---
 Run the attached insert script to insert bad data
2- Restart the "bg" service/container
3- Tail the bg-ca.log and look for these errors:
 ERROR 2020-08-24 17:41:09,828 [Process Loader (tenant=clarity)] bpm.engine (clarity:process_admin:39585607__B01E6555-5C8C-42D9-838E-81141A8E242F:none) 
 com.niku.bpm.BpmException: loadProcessInstances - Missmatched Pas Conditions. passConditionIndex: 0 passConditionRows.length: 18
 dbResults size: 5
   DBResultSet: 0 No of rows: 10
  Row: 0 No of columns: 9
    Column Name: process_version_id Value: 5033063
    Column Name: initiated_by Value: 5207002
    Column Name: status_code Value: BPM_PIS_RUNNING
    Column Name: process_code Value: boe_ir_3_0_31
    Column Name: process_instance_id Value: 5765286
    Column Name: initiated_type_code Value: BPM_PIT_USER
    Column Name: start_step_id Value: 5076190
    Column Name: src_step_action_result_id Value: -1
    Column Name: end_step_id Value: 5076191


Expected Results: Process engine ignore bad rows in BPM_RUN_PROCESSES

Actual Results:  Process engine loops on the bad data stopping other valid processes from running.

Workaround: 
Run the following SELECT and DELETE statement against the database:
 SELECT * FROM
          BPM_RUN_PROCESSES
          where process_engine_id is null 
          AND STATUS_CODE NOT IN ('BPM_PIS_DONE', 'BPM_PIS_ABORTED');
    
-- Delete statement
 DELETE FROM 
          BPM_RUN_PROCESSES
          where process_engine_id   is null 
          AND STATUS_CODE NOT IN ('BPM_PIS_DONE', 'BPM_PIS_ABORTED');