Wednesday, April 16, 2014

What the heck is going on with my (Approval Workflow Engine) AWE????

Yes, that is the question that has been haunting me for the past 24 hours.  AWE is not working!

The symptoms are:
1. I am getting errors below when initiating any AWE.
  • "Optimistic lock exception at %1.  Please refresh the page try the same operation again. (18081,1009) EOAW_CORE.Utils.OnExecute  Name:ThrowOptimisticLockException  PCPC:19812  Statement:511The problem also occurs when the counter in the table EOAW_IDS is incorrect."
  • at Approval process instance (Id = 'JobOpening', Definition ID = 'BYU_Hiring_Mgr_Recruiter', Effective date '1901-01-02', Thread id '48213') (18081,1056):10:1, Step nbr 1 (18081,1058) EOAW_CORE.ENGINE.DefStepInst.OnExecute  Name:Activate  PCPC:9660  Statement:143
2. Status monitor shows old workflow steps.

After poking around some codes and debugging them, I finally found that USERINST_ID and STEPINST_ID counter in the EOAW_IDS table are out of sync with the transactional tables: EOAW_USERINST and EOAW_STEPINST.

So, here is the solution:

Update ps_eoaw_ids set eoawcounter = (Select max(eoawstep_instance) + 1 from PS_EOAW_STEPINST) where eoawcountername = 'STEPINST_ID';

Update ps_eoaw_ids set eoawcounter = (Select max(eoawustep_inst_id) + 1 from PS_EOAW_USERINST) where eoawcountername = 'USERINST_ID';


3 comments:

  1. Worked like a charm. Thank you very much.

    Regards
    Ankit Consul

    ReplyDelete
  2. Could not update the record for Thread id 424615.
    (18081,1003) EOAW_CORE.ENGINE.Thread.OnExecute Na me:Update PCPC:16236 Statement:231 Called from:EOAW_CORE.ENGINE.Thread.OnExecute Name:Suspend Statement:309 Called from:EOAW_CORE.ENGINE.Thread.OnExecute Name:Activate Statement:291 Called from:EOAW_CORE.ENGINE.PathInst.OnExecute Name:Launch Statement:60 Called from:EOAW_CORE.ENGINE.StageInst.OnExecute Name:InnerLaunch Statement:211 Called from:EOAW_CORE.ENGINE.StageInst.OnExecute Name:Launch

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete