The following lines contain the word 'select', 'insert', 'update' or 'delete':
g_insert_dml_mode VARCHAR2(6) := 'INSERT';
g_update_dml_mode VARCHAR2(6) := 'UPDATE';
g_delete_dml_mode VARCHAR2(6) := 'DELETE';
select end_date
from wf_items
where item_type = p_item_type
and item_key = p_item_key;
select end_date
from fnd_user
where user_id = p_creator_user_id;
select null
from fnd_form_functions
where function_id = p_function_id;
p_new_dml_mode = g_insert_dml_mode OR
p_new_dml_mode = g_update_dml_mode OR
p_new_dml_mode = g_delete_dml_mode
then
-- dml_mode was specified
RETURN(p_new_dml_mode);
insert into hr_wip_transactions(transaction_id
,creator_user_id
,item_type
,item_key
,function_id
,state
,sub_state
,vo_cache
,context_display_text
,dml_mode
)
values(hr_wip_transactions_s.nextval
,p_creator_user_id
,p_item_type
,p_item_key
,p_function_id
,g_start_state
,null
,p_vo_xml
,p_context_display_text
,p_dml_mode
)returning transaction_id into l_tran_id;
update hr_wip_transactions
set state = p_state
,sub_state = p_sub_state
,vo_cache = p_vo_xml
,context_display_text = p_context_display_text
,dml_mode = p_dml_mode
where transaction_id = p_transaction_id;
select creator_user_id
,transaction_id
,state,dml_mode
,context_display_text
from hr_wip_transactions
where item_type = p_item_type
and item_key = p_item_key;
select creator_user_id,
state,
dml_mode,
context_display_text
from hr_wip_transactions
where transaction_id = p_transaction_id;
select vo_cache
from hr_wip_transactions
where transaction_id = p_transaction_id
for update nowait;
update hr_wip_transactions
set vo_cache = l_db_clob
where transaction_id = p_transaction_id;
select creator_user_id,
transaction_id,
state,
dml_mode,
context_display_text
from hr_wip_transactions
where item_type = p_item_type
and item_key = p_item_key;
select creator_user_id,
state,
dml_mode,
context_display_text
from hr_wip_transactions
where transaction_id = p_transaction_id;
select transaction_id,
state,
vo_cache,
dml_mode,
context_display_text
from hr_wip_transactions
where item_type = p_item_type
and item_key = p_item_key;
select state,
vo_cache,
dml_mode,
context_display_text
from hr_wip_transactions
where transaction_id = p_transaction_id;
Procedure delete_transaction
(p_item_type IN wf_items.item_type%TYPE
,p_item_key IN wf_items.item_key%TYPE
)is
PRAGMA AUTONOMOUS_TRANSACTION;
select transaction_id
from hr_wip_transactions
where item_type = p_item_type
and item_key = p_item_key;
delete from hr_wip_locks
where transaction_id = l_transaction_id;
delete from hr_wip_transactions
where transaction_id = l_transaction_id;
end delete_transaction;
Procedure delete_transaction
(p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
)is
PRAGMA AUTONOMOUS_TRANSACTION;
select null
from hr_wip_transactions
where transaction_id = p_transaction_id;
delete from hr_wip_locks
where transaction_id = p_transaction_id;
delete from hr_wip_transactions
where transaction_id = p_transaction_id;
end delete_transaction;
Procedure update_transaction
(p_item_type IN wf_items.item_type%TYPE
,p_item_key IN wf_items.item_key%TYPE
,p_state IN hr_wip_transactions.state%TYPE
,p_sub_state IN hr_wip_transactions.sub_state%TYPE
,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
default hr_api.g_varchar2
,p_vo_xml IN VARCHAR2
,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
default hr_api.g_varchar2
)is
PRAGMA AUTONOMOUS_TRANSACTION;
select transaction_id
,dml_mode
,context_display_text
from hr_wip_transactions
where item_type = p_item_type
and item_key = p_item_key;
end update_transaction;
Procedure update_transaction
(p_transaction_id IN hr_wip_transactions.transaction_id%TYPE
,p_state IN hr_wip_transactions.state%TYPE
,p_sub_state IN hr_wip_transactions.sub_state%TYPE
,p_dml_mode IN hr_wip_transactions.dml_mode%TYPE
default hr_api.g_varchar2
,p_vo_xml IN VARCHAR2
,p_context_display_text IN hr_wip_transactions.context_display_text%TYPE
default hr_api.g_varchar2
)is
PRAGMA AUTONOMOUS_TRANSACTION;
select dml_mode,
context_display_text
from hr_wip_transactions
where transaction_id = p_transaction_id;
end update_transaction;