Search from 700 + Posts

Dec 24, 2010

Query to get workflow details for ATO Model Stuck at WAIT_FOR_CTO and Config line alredy Shipped.

select p.process_name, p.activity_name, p.activity_item_type, s.activity_result_code,s.activity_status, s.action

from wf_item_activity_statuses s,
wf_process_activities p
where s.process_activity = p.instance_id
and s.item_type='OEOL'
and p.activity_name = 'WAIT_FOR_CTO'
and s.activity_status = 'NOTIFIED'
and s.item_key = to_char(&Enter_Model_line_id)
and exists (
   select 1 from wf_item_activity_statuses s2,
wf_process_activities p2,
oe_order_lines_all l
where l.item_type_code = 'CONFIG'
and l.ato_line_id = to_number(s.item_key)
and s2.item_key = to_char(l.line_id)
and s2.item_type = 'OEOL'
and p2.instance_id = s2.process_activity
and p2.activity_name = 'FULFILL_LINE'
and s2.activity_status = 'NOTIFIED');

No comments:

Post a Comment