Main Tables Views Materialized Views Indexes Constraints Triggers Procedures Functions Packages Sequences Java Sources Jobs Sanity Check Index DDL scrips
Arguments Source

SET_KS_SESSION_HISTORY_MESSAGE

Arguments:

NameData TypeDefault ValueIn/Out
KICKSTART_SESSION_ID_INNUMBER(38) IN
STATE_LABEL_INVARCHAR2 IN
MESSAGE_INVARCHAR2 IN
DDL script

Source

Legend: comment string keyword reserved word operator
     1: procedure
     2: set_ks_session_history_message (
     3: 	kickstart_session_id_in in number,
     4: 	state_label_in in varchar2,
     5: 	message_in in varchar2
     6: ) is
     7: 	cursor states is
     8: 		select	id
     9: 		from	rhnKickstartSessionState
    10: 		where	label = state_label_in;
    11: 	cursor history_items(state_id_in in number) is
    12: 		select	id
    13: 		from	rhnKickstartSessionHistory
    14: 		where	kickstart_session_id = kickstart_session_id_in
    15: 			and state_id = state_id_in
    16: 		order by time desc;
    17: begin
    18: 	for state in states loop
    19: 		for item in history_items(state.id) loop
    20: 			update rhnKickstartSessionHistory
    21: 				set message = message_in
    22: 				where id = item.id;
    23: 			return;
    24: 		end loop;
    25: 		insert into rhnKickstartSessionHistory (
    26: 				id, kickstart_session_id, state_id, message
    27: 			) values (
    28: 				rhn_ks_sessionhist_id_seq.nextval,
    29: 				kickstart_session_id_in,
    30: 				state.id,
    31: 				message_in
    32: 			);
    33: 		return;
    34: 	end loop;
    35: end;