CREATE OR REPLACE VIEW processflow_detailview_v AS SELECT pf.parentid AS processflow_id, pf.childid AS processflow_activity_id FROM pctree pf WHERE pf.childrole = 'OwnedProcessActivities' OR pf.childrole = 'Activities';