The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT count(1)
into cnt
FROM WF_ACTIVITY_TRANSITIONS WAT
WHERE WAT.TO_PROCESS_ACTIVITY = actid
AND NOT EXISTS
(SELECT NULL
FROM WF_ITEM_ACTIVITY_STATUSES WIAS
WHERE WIAS.PROCESS_ACTIVITY = WAT.FROM_PROCESS_ACTIVITY
AND WIAS.ITEM_TYPE = itemtype
AND WIAS.ITEM_KEY = itemkey
AND WIAS.ACTIVITY_STATUS = 'COMPLETE'
AND (WAT.RESULT_CODE in (WIAS.ACTIVITY_RESULT_CODE,
wf_engine.eng_trans_any)
OR (WAT.RESULT_CODE = wf_engine.eng_trans_default
AND NOT EXISTS
(SELECT NULL
FROM WF_ACTIVITY_TRANSITIONS WAT2
WHERE WAT2.FROM_PROCESS_ACTIVITY =
WAT.FROM_PROCESS_ACTIVITY
AND WAT2.RESULT_CODE = WIAS.ACTIVITY_RESULT_CODE)
)
)
);
select (sysdate - nvl(begin_date,sysdate))*86400
from wf_item_activity_statuses
where item_type = itemtype
and item_key = itemkey
and process_activity = actid;
select (sysdate - begin_date)*86400
from wf_items
where item_type = itemtype
and item_key = itemkey;
select WAAV.VALUE_TYPE, substrb(WAAV.TEXT_VALUE, 1, 30)
into LRefflag, LAName
from WF_ACTIVITY_ATTR_VALUES WAAV
where WAAV.PROCESS_ACTIVITY_ID = actid
and WAAV.NAME = 'EVENT';
SELECT wat.to_process_activity,
wpa.activity_name,
wpa.perform_role,
wpa.perform_role_type
FROM wf_activity_transitions wat,
wf_process_activities wpa
WHERE wat.from_process_activity = actid
AND wat.result_code = wf_engine.eng_trans_default
AND wat.to_process_activity = wpa.instance_id;
select count(1)
from wf_item_activity_statuses wias,
wf_process_activities wpa
where wias.item_type = itemtype
and wias.activity_status = 'NOTIFIED'
and wias.process_activity = wpa.instance_id
and wpa.activity_name = act_name
and assigned_user = user;
select max(begin_date)
from wf_item_activity_statuses wias,
wf_process_activities wpa
where wias.item_type = itemtype
and wias.process_activity = wpa.instance_id
and wpa.activity_name = act_name
and wias.assigned_user = user;
select wpa.instance_label
into label
from wf_process_activities wpa
where wpa.instance_id = trans_rec.to_process_activity;
select wfl.lookup_code result_code
from wf_lookups wfl,
wf_activities wfa,
wf_process_activities wfpa,
wf_items wfi
where wfl.lookup_type = wfa.result_type
and wfa.name = wfpa.activity_name
and wfi.begin_date >= wfa.begin_date
and wfi.begin_date < nvl(wfa.end_date,wfi.begin_date+1)
and wfpa.activity_item_type = wfa.item_type
and wfpa.instance_id = actid
and wfi.item_key = itemkey
and wfi.item_type = itemtype;
select parent_item_type, parent_item_key
into l_parent_itemtype, l_parent_itemkey
from wf_items
where item_type = WaitForMasterFlow.itemtype
and item_key = WaitForMasterFlow.itemkey;
select 'master activity not complete'
into dummy
from WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA
where WIAS.ITEM_TYPE = l_parent_itemtype
and WIAS.ITEM_KEY = l_parent_itemkey
and WIAS.PROCESS_ACTIVITY = WPA.INSTANCE_ID
and WPA.INSTANCE_LABEL = label
and WPA.PROCESS_NAME = nvl(process, WPA.PROCESS_NAME)
and wias.activity_status in (wf_engine.eng_completed, wf_engine.eng_active);
select count(1)
from wf_items
where parent_item_type = itemtype
and parent_item_key = itemkey
and end_date is null;
select count(1)
from WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA
where (WIAS.ITEM_TYPE, WIAS.ITEM_KEY) in (select item_type,item_key
from wf_items
where parent_item_type =itemtype
and parent_item_key =itemkey
and end_date is null)
and WIAS.PROCESS_ACTIVITY = WPA.INSTANCE_ID
and WPA.INSTANCE_LABEL = plabel
and WPA.PROCESS_NAME = nvl(pname, WPA.PROCESS_NAME)
and wias.activity_status in (wf_engine.eng_completed, wf_engine.eng_active);
select instance_label
from wf_process_activities
where instance_id = p_actid;
select item_type, item_key
from wf_items
where parent_item_type = itemtype
and parent_item_key = itemkey
and end_date is null;
select count(1)
from wf_items
where parent_item_type = l_parent_itemtype
and parent_item_key = l_parent_itemkey
and parent_context = l_parent_context
and (item_type <> ContinueMasterFlow.itemtype
or item_key <> ContinueMasterFlow.itemkey)
and end_date is null;
select count(1)
from wf_items
where parent_item_type = l_parent_itemtype
and parent_item_key = l_parent_itemkey
and (item_type <> ContinueMasterFlow.itemtype
or item_key <> ContinueMasterFlow.itemkey)
and end_date is null;
select count(1)
from WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA,
WF_ITEMS WI
where WIAS.ITEM_TYPE = itemtype
and WIAS.ITEM_KEY = WI.item_key
and WI.parent_item_type = l_parent_itemtype
and WI.parent_item_key = l_parent_itemkey
and (WI.item_type <> itemtype OR WI.item_key <> itemkey )
and WI.end_date is null
and WIAS.PROCESS_ACTIVITY = WPA.INSTANCE_ID
and WPA.INSTANCE_LABEL = label
and wias.activity_status in (wf_engine.eng_completed,
wf_engine.eng_active);
select parent_item_type, parent_item_key, parent_context
into l_parent_itemtype, l_parent_itemkey, l_parent_context
from wf_items
where item_type = ContinueMasterFlow.itemtype
and item_key = ContinueMasterFlow.itemkey;
select instance_label
into label
from wf_process_activities
where instance_id = actid;
select item_key
into dummy
from wf_items
where item_type = l_parent_itemtype
and item_key = l_parent_itemkey
for update;
select WIAS.ACTIVITY_STATUS
from WF_ITEM_ACTIVITY_STATUSES WIAS
where WIAS.ITEM_TYPE = litemtype
and WIAS.ITEM_KEY = litemkey
and WIAS.PROCESS_ACTIVITY = lactid;
select source_type into l_source
from wf_event_subscriptions
where guid = l_subscription;
select 'LOCAL' into l_source
from wf_systems ws
where ws.guid = hextoraw(wf_core.translate('WF_SYSTEM_GUID'))
and ws.name = nvl(l_event_t.GetFromAgent().GetSystem(),ws.name);
select out_agent_guid, to_agent_guid
from wf_event_subscriptions
where guid = l_subguid;
select wfa.name||'@'||wfs.name
into l_outagent
from wf_agents wfa, wf_systems wfs
where wfa.guid = l_outagentguid
and wfa.system_guid = wfs.guid;
select wfa.name||'@'||wfs.name
into l_toagent
from wf_agents wfa, wf_systems wfs
where wfa.guid = l_toagentguid
and wfa.system_guid = wfs.guid;
select wfa.name agent
from wf_systems wfs,
wf_agents wfa
where wfs.name = l_system
and wfa.status = 'ENABLED'
and wfa.direction = 'IN'
and wfa.name not in ('WF_ERROR','WF_DEFERRED');
SELECT parameters, java_rule_func
INTO l_params, l_rule_func
FROM wf_event_subscriptions
WHERE guid = l_subscription;
SELECT action_code
INTO l_action_code
FROM wf_event_subscriptions
WHERE guid = l_subscription;
select message_type, message_name, subject, recipient_role, responder
into l_messageType, l_messageName, l_subject, l_recipient, l_responder
from wf_notifications
where notification_id = l_nid;
select text
into l_error_recipient
from wf_resources
where name = 'WF_ADMIN_ROLE'
and language = userenv('LANG');
select message_type, item_key, context
into l_itemtype, l_itemkey, l_context
from wf_notifications
where notification_id = l_nid;
SELECT activity_status into l_status FROM wf_item_activity_statuses WHERE notification_id = l_nid;