I'm creating a new process flow trigger when a record is DELETED (not added) in PA52.4. I created a user exit file and Process Flow service called PA52E.4_D, but the PA52.4 delete action isn't creating any work units Has anyone created a PF trigger when you DELETE a record in a program? -mgraham
I got the PA52.4 & PA52.5 delete triggers to work with an END user exit file PA52EPD. The code is below if anyone wants it. You also need to set up a service in PF Admin called "PA52E.4_D" and "PA52E.5_D" with service variables. --MGraham 000400****************************************************************** 000500 PA52ES1-TRANSACTION SECTION 30. 000600****************************************************************** 000700 PA52ES1-START. 166600 PA52ES1-TRANSACTION-END. * 166800****************************************************************** 166900 PA52ES2-TRANSACTION SECTION 31. 167000****************************************************************** 167100 PA52ES2-START. 267200 PA52ES2-TRANSACTION-END. * 267300****************************************************************** 267500 PA52ES3-TRANSACTION SECTION 32. 267600****************************************************************** 267700 PA52ES3-START. 360500 PA52ES3-TRANSACTION-END. * 360700****************************************************************** 360800 PA52ES4-TRANSACTION SECTION 33. 360900****************************************************************** 361000 PA52ES4-START. *------------------------------------------------------------- * PF Service Variables when a HIRE action is deleted on PA52.4. *-------------------------------------------------------------
PERFORM 1000-OPEN-WORKFLOW-DB.
**** COMPANY MOVE "Company" TO WFAPI-I-VARIABLE-NAME (1). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (1). MOVE PA52F4-PCT-COMPANY TO WFAPI-I-VARIABLE-VAL (1).
**** ACTION-TYPE MOVE "Action_Type" TO WFAPI-I-VARIABLE-NAME (2). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (2). MOVE PA52F4-PT-ACTION-TYPE TO WFAPI-I-VARIABLE-VAL (2).
**** EFFECT-DATE MOVE "Effect_Date" TO WFAPI-I-VARIABLE-NAME (3). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (3). MOVE PA52F4-PCT-EFFECT-DATE TO WFAPI-I-VARIABLE-VAL (3).
**** ACTION-CODE MOVE "Action" TO WFAPI-I-VARIABLE-NAME (4). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (4). MOVE PA52F4-PCT-ACTION-CODE TO WFAPI-I-VARIABLE-VAL (4).
**** APPLICANT MOVE "Applicant" TO WFAPI-I-VARIABLE-NAME (5). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (5). MOVE PA52F4-PCT-APPLICANT TO WFAPI-I-VARIABLE-VAL (5).
**** ACTION-NBR MOVE "Action_Nbr" TO WFAPI-I-VARIABLE-NAME (6). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (6). MOVE PA52F4-PCT-ACTION-NBR TO WFAPI-I-VARIABLE-VAL (6).
**** SUPERVISOR MOVE "New_Supervisor" TO WFAPI-I-VARIABLE-NAME (7). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (7). MOVE PA52F4-PCT-NEW-VALUE-1 (10) TO WFAPI-I-VARIABLE-VAL (7).
**** NEW PROCESS LEVEL MOVE "New_Process_Level" TO WFAPI-I-VARIABLE-NAME (8). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (8). MOVE PA52F4-PCT-NEW-VALUE-1 (8) TO WFAPI-I-VARIABLE-VAL (8). **** NEW DEPARTMENT MOVE "New_Department" TO WFAPI-I-VARIABLE-NAME (9). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (9). MOVE PA52F4-PCT-NEW-VALUE-1 (9) TO WFAPI-I-VARIABLE-VAL (9).
**** NEW POSITION MOVE "New_Position" TO WFAPI-I-VARIABLE-NAME (10). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (10). MOVE PA52F4-PCT-NEW-VALUE-1 (6) TO WFAPI-I-VARIABLE-VAL (10).
IF (PA52F4-FC = "D") MOVE "PA52E.4_D" TO WFAPI-I-SERVICE.
MOVE "HR HIRE DELETE" TO WFAPI-I-WORK-TITLE.
PERFORM 1000-PROCESS-FLOW.
PA52ES4-TRANSACTION-END. ****************************************************************** PA52ES5-TRANSACTION SECTION 30. ****************************************************************** PA52ES5-START.
*--------------------------------------------------------------- * PF Service Variables when a personnel action is deleted on * PA52.5, e.g., REHIRE, PROMOTION, DEMOTION, LATERAL. *---------------------------------------------------------------
**** COMPANY MOVE "Company" TO WFAPI-I-VARIABLE-NAME (1). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (1). MOVE PA52F5-PCT-COMPANY TO WFAPI-I-VARIABLE-VAL (1).
**** ACTION-TYPE MOVE "Action_Type" TO WFAPI-I-VARIABLE-NAME (2). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (2). MOVE PA52F5-PT-ACTION-TYPE TO WFAPI-I-VARIABLE-VAL (2).
**** EFFECT-DATE MOVE "Effect_Date" TO WFAPI-I-VARIABLE-NAME (3). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (3). MOVE PA52F5-PCT-EFFECT-DATE TO WFAPI-I-VARIABLE-VAL (3).
**** ACTION-CODE MOVE "Action" TO WFAPI-I-VARIABLE-NAME (4). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (4). MOVE PA52F5-PCT-ACTION-CODE TO WFAPI-I-VARIABLE-VAL (4).
**** EMPLOYEE MOVE "Employee" TO WFAPI-I-VARIABLE-NAME (5). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (5). MOVE PA52F5-PCT-EMPLOYEE TO WFAPI-I-VARIABLE-VAL (5).
**** ACTION-NBR MOVE "Action_Nbr" TO WFAPI-I-VARIABLE-NAME (6). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (6). MOVE PA52F5-PCT-ACTION-NBR TO WFAPI-I-VARIABLE-VAL (6).
**** NEW SUPERVISOR MOVE "New_Supervisor" TO WFAPI-I-VARIABLE-NAME (7). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (7). IF (PA52F5-PCT-NEW-SUPERVISOR = SPACES) MOVE PA52F5-PCT-SUPERVISOR TO WFAPI-I-VARIABLE-VAL (7) ELSE MOVE PA52F5-PCT-NEW-SUPERVISOR TO WFAPI-I-VARIABLE-VAL (7).
**** NEW PROCESS LEVEL MOVE "New_Process_Level" TO WFAPI-I-VARIABLE-NAME (8). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (8). IF (PA52F5-PCT-NEW-PL = SPACES) MOVE PA52F5-PCT-PL TO WFAPI-I-VARIABLE-VAL (8) ELSE MOVE PA52F5-PCT-NEW-PL TO WFAPI-I-VARIABLE-VAL (8). **** NEW DEPARTMENT MOVE "New_Department" TO WFAPI-I-VARIABLE-NAME (9). MOVE "S" TO WFAPI-I-VARIABLE-TYPE (9). IF (PA52F5-PCT-NEW-DEPARTMENT = SPACES) MOVE PA52F5-PCT-DEPARTMENT TO WFAPI-I-VARIABLE-VAL (9) ELSE MOVE PA52F5-PCT-NEW-DEPARTMENT TO WFAPI-I-VARIABLE-VAL (9). IF (PA52F5-FC = "D") MOVE "PA52E.5_D" TO WFAPI-I-SERVICE.
PA52ES5-TRANSACTION-END. ******************************************************************