I am getting this error on a custom event when I try to post a background job using a Deferred Call.
“Too many declarations of 'Deferred_Call' match this call”
The Action Details of the event are below
DECLARE
rowkey_attr_ VARCHAR2(32000) := '&NEW:ROWKEY';
wo_no_attr_ VARCHAR2(32000) := NULL;
app_amt_attr_ varchar2(2000):='&NEW:CF$_APPLICATION_AMOUNT';
invoice_attr_ varchar2(2000):='&NEW:CF$_INVOICE_NO';
po_attr_ varchar2(2000):='&NEW:CF$_PO_NUMBER';
params_ VARCHAR2(32000) ;
job_id_ VARCHAR2(32000) ;
BEGIN
SELECT WO_NO INTO wo_no_attr_ FROM ACTIVE_SEPARATE_OVERVIEW WHERE OBJKEY=rowkey_attr_ ;
client_sys.Clear_Attr(params_);
client_sys.Add_To_Attr('wo_no_', wo_no_attr_ , params_);
client_sys.Add_To_Attr('app_amt', app_amt_attr_ , params_);
client_sys.Add_To_Attr('inv_no', invoice_attr_ , params_);
client_sys.Add_To_Attr('po_no', po_attr_ , params_);
transaction_sys.Deferred_Call(job_id_, 'EPS_TECH_UTIL_API.UPDATE_ACTIVE_WORK_ORDER_BKUP','ATTRIBUTE', params_,'Update the Work Order',sysdate,'FALSE',2);
END;
The procedure I am calling is below
PROCEDURE UPDATE_ACTIVE_WORK_ORDER_BKUP ( params_ varchar2)
is
thewo VARCHAR2(32000) ;
begin
thewo:= client_sys.Get_Item_Value('wo_no_', params_);
INSERT INTO TEST2 VALUES ('wo_no_ '|| thewo);
COMMIT;
end;
What I am executing in the procedure is just for testing purposes, the finished procedure will look different. I don’t think the issue is the procedure the deferred call is calling, I think it is in the custom event the problem is. I have tried removing some of the parameters, renaming variables ,renaming the procedure, putting the procedure in a different package but nothing works.
I cannot make and deferred calls in custom events, I get this every time. Is there a limit on the number of times deferred call can be used in custom events?
I have lots of other custom events that use it and they all execute fine.