DBA Data[Home] [Help]

APPS.WF_ITEM SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 89

  select WI.ROOT_ACTIVITY, WI.ROOT_ACTIVITY_VERSION, WI.BEGIN_DATE,
         WI.USER_KEY
  into wf_item.c_root_activity, wf_item.c_root_activity_version,
       wf_item.c_begin_date, wf_item.c_userkey
  from WF_ITEMS WI
  where WI.ITEM_TYPE = InitCache.itemtype
  and WI.ITEM_KEY = InitCache.itemkey;
Line: 108

    select text_default into onDemandFlag from wf_activity_attributes
      where activity_item_type = c_itemtype
      and   activity_name = c_root_activity
      and   activity_version=c_root_activity_version
      and   name = '#ONDEMANDATTR';
Line: 189

	update WF_ITEMS set
      PARENT_ITEM_TYPE = Set_Item_Parent.parent_itemtype,
      PARENT_ITEM_KEY = Set_Item_Parent.parent_itemkey,
      PARENT_CONTEXT = Set_Item_Parent.parent_context
    where ITEM_TYPE = Set_Item_Parent.itemtype
    and ITEM_KEY = Set_Item_Parent.itemkey;
Line: 201

    select count(1) into l_count
    from WF_ITEMS
    CONNECT BY PRIOR PARENT_ITEM_TYPE = ITEM_TYPE AND
    PRIOR PARENT_ITEM_KEY = ITEM_KEY
    start with ITEM_TYPE=Set_Item_Parent.itemtype AND
          ITEM_KEY=Set_Item_Parent.itemkey;
Line: 245

        update WF_ITEM_ATTRIBUTE_VALUES
           set NUMBER_VALUE = NUMBER_VALUE + 1
         where NAME like '#CNT_%'
           and NUMBER_VALUE is not null
           and ITEM_TYPE = parent_itemType
           and ITEM_KEY = parent_itemKey;
Line: 292

  update WF_ITEMS WI set
    OWNER_ROLE = SetItemOwner.owner
  where WI.ITEM_TYPE = SetItemOwner.itemtype
  and WI.ITEM_KEY = SetItemOwner.itemkey;
Line: 327

  update WF_ITEMS WI set
    USER_KEY = SetItemUserKey.userkey
  where WI.ITEM_TYPE = SetItemUserKey.itemtype
  and WI.ITEM_KEY = SetItemUserKey.itemkey;
Line: 377

  select USER_KEY
  into buf
  from WF_ITEMS WI
  where WI.ITEM_TYPE = GetItemUserKey.itemtype
  and WI.ITEM_KEY = GetItemUserKey.itemkey;
Line: 486

    select WIA.ITEM_TYPE, WIA.NAME, WIA.TYPE, WIA.SUBTYPE, WIA.FORMAT,
           WIA.TEXT_DEFAULT, WIA.NUMBER_DEFAULT, WIA.DATE_DEFAULT
    from   WF_ITEM_ATTRIBUTES WIA
    where  WIA.ITEM_TYPE = itype;
Line: 497

    insert into WF_ITEMS (
      ITEM_TYPE,
      ITEM_KEY,
      ROOT_ACTIVITY,
      ROOT_ACTIVITY_VERSION,
      OWNER_ROLE,
      PARENT_ITEM_TYPE,
      PARENT_ITEM_KEY,
      BEGIN_DATE,
      END_DATE,
      USER_KEY
    ) values (
      itemtype,
      itemkey,
      wflow,
      rootversion,
      Create_Item.owner_role,
      '',
      '',
      actdate,
      to_date(NULL),
      Create_item.user_key
    );
Line: 534

    select text_default into onDemandFlag from wf_activity_attributes
      where activity_item_type = c_itemtype
      and   activity_name = c_root_activity
      and   activity_version=c_root_activity_version
      and   name = '#ONDEMANDATTR';
Line: 550

    insert into WF_ITEM_ATTRIBUTE_VALUES (
      ITEM_TYPE,
      ITEM_KEY,
      NAME,
      TEXT_VALUE,
      NUMBER_VALUE,
      DATE_VALUE
    ) select
      itemtype,
      itemkey,
      WIA.NAME,
      WIA.TEXT_DEFAULT,
      WIA.NUMBER_DEFAULT,
      WIA.DATE_DEFAULT
    from WF_ITEM_ATTRIBUTES WIA
    where WIA.ITEM_TYPE = itemtype;
Line: 654

  select '1'
  from   wf_items
  where  item_type = itemtype
  and    item_key  = itemkey
  for update nowait;
Line: 729

    UPDATE    wf_items
    SET       end_date = sysdate
    WHERE     item_type = p_itemType
    AND       item_key = p_itemKey
    AND       end_date is NULL
    RETURNING parent_item_type, parent_item_key, parent_context
    INTO      l_parent_itemtype, l_parent_itemkey, l_parent_context;
Line: 768

          SELECT TEXT_VALUE
          bulk collect into attrNames
          FROM WF_ITEM_ATTRIBUTE_VALUES
          WHERE ITEM_TYPE = p_itemType
          AND   ITEM_KEY = p_itemKey
          AND   NAME like ('#LBL_%')
          AND   TEXT_VALUE is NOT null;
Line: 792

          SELECT wiav.NAME
          bulk collect into attrNames
          FROM WF_ITEM_ATTRIBUTE_VALUES wiav
          WHERE wiav.ITEM_TYPE = l_parent_itemType
          AND   wiav.ITEM_KEY = l_parent_itemKey
          and   wiav.NAME like ('#CNT_%')
          AND NOT EXISTS (select null
                          from   wf_item_attribute_values wiav2
                          where  wiav2.item_type = p_itemType
                          and    wiav2.item_key = p_itemKey
                          and    wiav2.name = REPLACE(wiav.name,'#CNT_','#LBL_'));
Line: 816

    for c_abort in (select item_type, item_key
                    from   wf_items wi
                    where wi.parent_item_type = p_itemtype
                    and   wi.parent_item_key = p_itemkey
                    and   wi.parent_item_type = (select wiav.text_value
                                                 from  wf_item_attribute_values wiav
                                                 where wiav.item_type = wi.item_type
                                                 and   wiav.item_key = wi.item_key
                                                 and   wiav.name = 'ERROR_ITEM_TYPE')
                    and   wi.parent_item_key = (select wiav.text_value
                                                from   wf_item_attribute_values wiav
                                                where  wiav.item_type = wi.item_type
                                                and    wiav.item_key = wi.item_key
                                                and    wiav.name = 'ERROR_ITEM_KEY')
                    and   exists (select null
                                  from   wf_item_attribute_values wiav
                                  where  wiav.item_type = wi.item_type
                                  and    wiav.item_key = wi.item_key
                                  and    wiav.name = 'ERROR_ACTIVITY_LABEL')
                    and end_date is null)
    loop
       WF_ENGINE.AbortProcess(c_abort.item_type, c_abort.item_key);