Skip to Main Content

DBLink usage in Trigger

911643Jan 17 2012 — edited Jan 17 2012
I have created the below trigger and I am receiving an error that all of parameters need to be declared. I am using a dblink, does the dblink need to be associated with my parameters?

------------------------------------
create or replace
TRIGGER TXCUSTOM.SZ_WF_DWPETITION
AFTER INSERT OR UPDATE
ON DWSCHEMA.DAP_NOTE_DTL
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
WHEN (
(NEW.DAP_SCHOOL = 'GR') AND (NEW.DAP_NOTE_STATUS = 'PA' OR DAP_NOTE_STATUS = 'PR')
)


DECLARE
params GOKPARM.t_parameterlist;
event_code gtveqnm.gtveqnm_code%type;
v_submitterid DWSCHEMA.dap_create_id;
v_stuid DWSCHEMA.dap_stu_id;
v_approverid :NEW.dap_mod_id;
v_notes t.dap_note_text;

BEGIN
event_code := TXDWLNKUSR@gokevnt.f_checkevent('WORKFLOW', 'DWGAPETITION');

IF event_code <> 'NULL' then

SELECT t.dap_note_text
from DWSCHEMA.dap_note_dtl d, DWSCHEMA.dap_note_txt_dtl t
where (dap_note_status = 'PA' or dap_note_status = 'PR')
and d.dap_stu_id = t.dap_stu_id and d.dap_note_num = t.dap_note_num and (t.dap_note_text like '%COMMENTS%' or t.dap_note_text like '%REASON:%')
and t.dap_stu_id = :NEW.dap_stu_id;

params(1).param_value := event_code;
params(2).param_value := '';
params(3).param_value := 'Degreeworks Petiton for Student ' || ' - ' || v_stuid;
params(4).param_value := v_submitterid ;
params(5).param_value := v_stuid;
params(6).param_value := v_approverid;
params(7).param_value := v_notes;

TXDWLNKUSR@gokparm.send_param_list(event_code, params);

END if;


END;
Comments
Post Details
Added on Jan 17 2012
1 comment
146 views