Oracle Workflow - Function Activity Issue
439964May 26 2006 — edited Jun 1 2006Hi,
I created a leave application work flow and added a function activity in the process diagram. This function acitivity checks if the employee has leave balance or not.
Function Activity Parameters: Employee Name, leave start date and leave end date. These are also the input parameters of the procedure that I created - name of the procedure - call_leave_balance.(procedure details below)
I mentioned the procedure name CALL_LEAVE_BALANCE in the Function Activity properties window .
I loaded the work flow and did a try run:
Following is the error I got:
*********************************
Failed Activity Check Leave Balance
Activity Type Function
Error Name -6550
Error Message ORA-06550: line 1, column 7: PLS-00905: object APPS.CAL_LEAVE_BALANCE is invalid ORA-06550: line 1, column 7: PL/SQL: Statement ignored
Error Stack Wf_Engine_Util.Function_Call(CAL_LEAVE_BALANCE, NEW_TYPE, execution 17, 815790, RUN)
*************************************
Any idea why, when this occurs and how do i rectifiy it so that the procedure executes successfully.
Regards,
Siddharth
Procedure Details:
CREATE OR REPLACE PROCEDURE CAL_LEAVE_BALANCE (employeename in varchar2, leavestartdate in date, leaveenddate in date, RETVAL OUT BOOLEAN)
IS
leavebal NUMBER;
leavecount number;
BEGIN
SELECT leave_balance INTO leavebal FROM leavebalance WHERE ename =employeename;
leavecount := trunc(leaveenddate)-trunc(leavestartdate);
leavebal := leavebal-leavecount;
if leavebal>0 then
update leavebalance set leave_balance=leavebal where ename=employeename;
RETVAL := TRUE;
else
RETVAL := FALSE;
end if;
COMMIT;
END;