BPM engine errors in the bg-ca.log

book

Article ID: 103842

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

The bg logs shows following errors:

ERROR 2018-06-18 15:44:54,518 [Action Execution Pipeline 0 (tenant=clarity)] bpm.engine (clarity:process_admin:113588085__92009D90-DEBA-4BCB-9723-60B96FEDD8C6:none) Error (will retry) caused by Step Instance: [email protected] [Id: 41432066 Process Instance Id: 21014922 Step Id: 5091106 State: BPM_SIS_EXEC_ACTION Step Name: null Start Date: 2018-01-09 06:43:14.0 Expected End Date: null Percent Complete: 0.142857 Warned: false Retry Count: 451 No of Pre Conditions: -1 No of Post Conditions: -1 Last Condition Eval Time: 0 Pre Condition Wait Events: null Post Condition Wait Events: null Pass Conditions: [] Error Id: -1 
Process Thread: [email protected] [Id: 21032941 Parent Step Instance Id: -1 Join Step Instance Id: -1] 
Split Threads: null 
Join Threads:null] 
com.niku.bpm.BpmException: com.niku.bpm.BpmException: getSynchronouslyRunningAction - Cannot get synchronously running action Did not get exactly one rowset with 0 or 1 row back. 
dbResults size: 1 
DBResultSet: 0 No of rows: 2 
Row: 0 No of columns: 3 
Column Name: status_code Value: BPM_AIS_RUNNING 
Column Name: step_action_id Value: 5149752 
Column Name: id Value: 19914879 
Row: 1 No of columns: 3 
Column Name: status_code Value: BPM_AIS_RUNNING 
Column Name: step_action_id Value: 5149752 
Column Name: id Value: 19914878 
at com.niku.bpm.engine.rules.ActionExecutionPipeline.execute(ActionExecutionPipeline.java:107) 
at com.niku.bpm.engine.rules.Pipeline.run(Pipeline.java:280) 
Caused by: com.niku.bpm.BpmException: getSynchronouslyRunningAction - Cannot get synchronously running action Did not get exactly one rowset with 0 or 1 row back. 
dbResults size: 1 
DBResultSet: 0 No of rows: 2 
Row: 0 No of columns: 3 
Column Name: status_code Value: BPM_AIS_RUNNING 
Column Name: step_action_id Value: 5149752 
Column Name: id Value: 19914879 
Row: 1 No of columns: 3 
Column Name: status_code Value: BPM_AIS_RUNNING 
Column Name: step_action_id Value: 5149752 
Column Name: id Value: 19914878 
at com.niku.bpm.engine.persistence.EnginePersistenceUtils.getSynchronouslyRunningActionResult(EnginePersistenceUtils.java:1203) 
at com.niku.bpm.engine.objects.StepInstance.processSynchronousStepAction(StepInstance.java:836) 
at com.niku.bpm.engine.rules.ActionExecutionPipeline.execute(ActionExecutionPipeline.java:64) 
... 1 more

Environment

Component: PPMBPM

Resolution

Following steps would have to be performed for all process instances with this error message in the bg-ca.log:

  1. Stop BG Service
  2. Backup the table BPM_RUN_STEP_ACTION_RESULTS (use INTO statement) 
  3. Check the error (below) and figure out step_action_id 

    Row: 0 No of columns: 3 
    Column Name: status_code Value: BPM_AIS_RUNNING 
    Column Name: step_action_id Value: 5149752 
    Column Name: id Value: 19914879 

  4. Check process instances (in URL process_instance_id is brp.id) 

    select 
    distinct brar.id, 
    brp.id process_id, 
    brar.id, 
    brar.STEP_INSTANCE_ID, 
    brar.step_action_id 
    from BPM_DEF_PROCESSES bdp 
    inner join BPM_DEF_PROCESS_VERSIONS bdpv on (bdp.id = bdpv.PROCESS_ID) 
    inner join BPM_RUN_PROCESSES brp on (bdpv.id = brp.PROCESS_VERSION_ID) 
    inner join BPM_DEF_STAGES bdst on (bdpv.id = bdst.PROCESS_VERSION_ID ) 
    inner join BPM_RUN_STEPS brs on (brs.PROCESS_INSTANCE_ID = brp.id) 
    inner join BPM_DEF_STEPS bds on (brs.STEP_ID = bds.id ) 
    left join BPM_RUN_STEP_ACTION_RESULTS brar on (brar.STEP_INSTANCE_ID = 
    brs.id) 
    Where brar.STATUS_CODE = 'BPM_AIS_RUNNING' 
    and brar.step_action_id = 5149752 
    order by brp.id

  5. Enter this information to the select 

    SELECT * FROM BPM_RUN_STEP_ACTION_RESULTS 
    where status_code = 'BPM_AIS_RUNNING' 
    and step_action_id = 5149752 order by id

  6. There is supposed to be only one unique combination (STEP_INSTANCE_ID, STEP_ACTION_ID) with the lowest id (delete others)

    DELETE BPM_RUN_STEP_ACTION_RESULTS where id in (xxx)

  7. Start BG Service