Search This Blog

Thursday, June 23, 2016

SSHR error The changes were not applied because This transaction has failed because the employee's record or eligibility status has changed

Error:
The changes were not applied because This transaction has failed because the employee's record or eligibility status has changed. 
Submit a new transaction.
Another user has updated this person's record. Please reject the transaction 
so the initiator can check whether the change is still valid for the updated record.
 
Reason: The base tables are updated before the Workflow is completed. 
(like object version number is changed)
 
Identify:
SELECT distinct hat.creation_date workflow_start
       , wn.notification_id nid
       , (SELECT MAX(last_update_date) FROM hr.per_all_assignments_f paaf2 WHERE paaf2.person_id = papf3.person_id) last_assig_update
       , wn.begin_date error_date
       , wn.begin_date - (SELECT MAX(last_update_date) FROM hr.per_all_assignments_f paaf2 WHERE paaf2.person_id = papf3.person_id) dd
       , wn.item_key
             , SUBSTR(
                  wn.subject
                , 48
                , INSTR(SUBSTR(wn.subject, 48 + 2), 'performed on ')
               ) transaction_type
   ,CASE
                  WHEN SUBSTR( wn.subject , INSTR(wn.subject, 'performed on ') + 13 , 
LENGTH(wn.subject) - INSTR(wn.subject, 'performed on ') + 13 ) LIKE '%Miss%' 
THEN REPLACE( SUBSTR( wn.subject , INSTR(wn.subject, 'performed on ') + 13 ,
LENGTH(wn.subject) - INSTR(wn.subject, 'performed on ') + 13 ) , ' Miss' , '' )
                  WHEN SUBSTR( wn.subject , INSTR(wn.subject, 'performed on ') + 13 , 
LENGTH(wn.subject) - INSTR(wn.subject, 'performed on ') + 13 ) LIKE '%Mrs%' 
THEN REPLACE( SUBSTR( wn.subject , INSTR(wn.subject, 'performed on ') + 13 , 
LENGTH(wn.subject) - INSTR(wn.subject, 'performed on ') + 13 ) , ' Mrs' , '' )
                  WHEN SUBSTR( wn.subject , INSTR(wn.subject, 'performed on ') + 13 , 
LENGTH(wn.subject) - INSTR(wn.subject, 'performed on ') + 13 ) LIKE '%Ms%' 
THEN REPLACE( SUBSTR( wn.subject , INSTR(wn.subject, 'performed on ') + 13 , 
LENGTH(wn.subject) - INSTR(wn.subject, 'performed on ') + 13 ) , ' Ms' , '' )
                  WHEN SUBSTR( wn.subject , INSTR(wn.subject, 'performed on ') + 13 , 
LENGTH(wn.subject) - INSTR(wn.subject, 'performed on ') + 13 ) LIKE '%Mr%' 
THEN REPLACE( SUBSTR( wn.subject , INSTR(wn.subject, 'performed on ') + 13 , 
LENGTH(wn.subject) - INSTR(wn.subject, 'performed on ') + 13 ) , ' Mr' , '' )
                  ELSE SUBSTR( wn.subject , INSTR(wn.subject, 'performed on ') + 13 , 
LENGTH(wn.subject) - INSTR(wn.subject, 'performed on ') + 13 )
               END performed_on
       , wn.subject
       , papf3.full_name
       , papf3.employee_number empno
       , fu.user_name by_un
       , fu.description by_desc
       , papf.full_name by_name
    FROM applsys.wf_notifications wn
       , applsys.fnd_user fu
       , hr.hr_api_transactions hat
       , hr.per_all_people_f papf
       , hr.per_all_people_f papf3
       , hr.per_all_assignments_f paaf
   WHERE hat.item_key = wn.item_key
     AND hat.created_by = fu.user_id
     AND hat.creator_person_id = papf.person_id
     AND papf.person_id = paaf.person_id
     AND hat.selected_person_id = papf3.person_id
     AND SYSDATE BETWEEN papf.effective_start_date AND papf.effective_end_date
     AND SYSDATE BETWEEN papf3.effective_start_date AND papf3.effective_end_date
     AND SYSDATE BETWEEN paaf.effective_start_date AND paaf.effective_end_date
     --AND subject NOT LIKE '%Phone Numbers%'
    -- AND recipient_role = 'HRMS_DEV_ROLE'
     AND subject LIKE 'Application Error%'
     AND papf.current_employee_flag = 'Y'
     AND papf.employee_number = :P_EMPLOYEE_NUMBER --enter the issued empno 
      AND paaf.assignment_type = 'E'
ORDER BY 1 DESC 
 

5 comments:

  1. Can you please assist with the solution

    ReplyDelete
  2. go to Workflow Administrator Resp>Status Monitor
    search for the Employee>
    Select the workflow>Click the Activity HIstory Button
    Select the column where the activity is giving err>
    click rewind Button

    let me know if it works.

    ReplyDelete
    Replies
    1. I am not sure whether it worked, but this is what i got. firstly the days the employee doesnt get any notification nor does the approver. after confirming the rewind, the error is still available on the activity history list. yet i can see a completed notification with the status forced..

      Delete
  3. the answer to the question is no it was not fixed with the given solution, just got confirmation now

    ReplyDelete