Purpose: Restrict Employee to raise Multiple EIT
Transaction at one go
Step 1: Copy
Seeded Workflow “Change Extra Information” and define yours
Step 2: Create
Database Function
CREATE
OR REPLACE PROCEDURE xxhr_check_trans_raised (
itemtype IN VARCHAR2,
itemkey IN VARCHAR2,
actid IN NUMBER,
funmode IN VARCHAR2,
result OUT NOCOPY VARCHAR2)
IS
l_cnt NUMBER := 0;
BEGIN
IF
(funmode =
'RUN')
THEN
SELECT COUNT (*)
INTO
l_cnt
FROM
hr_api_transactions hat
WHERE hat.item_key =
itemkey;
IF
l_cnt = 1
THEN
result :=
'COMPLETE:' || 'FAILURE';
ELSE
result :=
'COMPLETE:' || 'SUCCESS';
END
IF;
ELSIF (funmode =
'CANCEL')
THEN
NULL;
END
IF;
END xxhr_check_trans_raised;
Step 3: Alter the
Workflow as show in the below screens
Step 3.1: Create New Function in Workflow as shown in
the below screen
Step 3.2
Step 3.3: Alter the above-created
workflow as shown below
No comments:
Post a Comment