DBA Data[Home] [Help]

APPS.WF_ENGINE dependencies on WF_ITEM_ACTIVITY_STATUSES

Line 3485: from WF_ITEM_ACTIVITY_STATUSES S

3481: -- avoid "not in" which disables index in RBO
3482: cursor curs_itype is
3483: select
3484: S.ROWID ROW_ID
3485: from WF_ITEM_ACTIVITY_STATUSES S
3486: where S.DUE_DATE < SYSDATE
3487: and S.ACTIVITY_STATUS in ('ACTIVE','WAITING','NOTIFIED',
3488: 'SUSPEND','DEFERRED')
3489: and S.ITEM_TYPE = itemtype;

Line 3494: from WF_ITEM_ACTIVITY_STATUSES S

3490:
3491: cursor curs_noitype is
3492: select
3493: S.ROWID ROW_ID
3494: from WF_ITEM_ACTIVITY_STATUSES S
3495: where S.DUE_DATE < SYSDATE
3496: and S.ACTIVITY_STATUS in ('ACTIVE','WAITING','NOTIFIED',
3497: 'SUSPEND','DEFERRED');
3498:

Line 3533: from WF_ITEM_ACTIVITY_STATUSES S , WF_ITEMS WI

3529: begin
3530: select
3531: S.ITEM_TYPE, S.ITEM_KEY, S.PROCESS_ACTIVITY
3532: into l_itemtype, l_itemkey, l_actid
3533: from WF_ITEM_ACTIVITY_STATUSES S , WF_ITEMS WI
3534: where S.DUE_DATE < SYSDATE
3535: and S.ACTIVITY_STATUS in ('WAITING','NOTIFIED','SUSPEND',
3536: 'DEFERRED','ACTIVE')
3537: and S.ROWID = idarr(i)

Line 3658: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */

3654: -- cases to get better execution plans.
3655:
3656: cursor curs_itype is
3657: select /*+ ORDERED USE_NL (WIASP WI WPAP WAP)
3658: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */
3659: WIASP.ROWID ROW_ID
3660: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3661: WF_ITEMS WI,
3662: WF_PROCESS_ACTIVITIES WPAP,

Line 3660: from WF_ITEM_ACTIVITY_STATUSES WIASP,

3656: cursor curs_itype is
3657: select /*+ ORDERED USE_NL (WIASP WI WPAP WAP)
3658: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */
3659: WIASP.ROWID ROW_ID
3660: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3661: WF_ITEMS WI,
3662: WF_PROCESS_ACTIVITIES WPAP,
3663: WF_ACTIVITIES WAP
3664: where WIASP.ITEM_TYPE = itemtype

Line 3676: from WF_ITEM_ACTIVITY_STATUSES WIASC,

3672: and WAP.TYPE = wf_engine.eng_process
3673: and WIASP.ACTIVITY_STATUS = 'ACTIVE' --use literal to force index
3674: and not exists
3675: (select null
3676: from WF_ITEM_ACTIVITY_STATUSES WIASC,
3677: WF_PROCESS_ACTIVITIES WPAC
3678: where WAP.ITEM_TYPE = WPAC.PROCESS_ITEM_TYPE
3679: and WAP.NAME = WPAC.PROCESS_NAME
3680: and WAP.VERSION = WPAC.PROCESS_VERSION

Line 3689: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */

3685: 'DEFERRED','ERROR'));
3686:
3687: cursor curs_noitype is
3688: select /*+ ORDERED USE_NL (WIASP WI WPAP WAP)
3689: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */
3690: WIASP.ROWID ROW_ID
3691: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3692: WF_ITEMS WI,
3693: WF_PROCESS_ACTIVITIES WPAP,

Line 3691: from WF_ITEM_ACTIVITY_STATUSES WIASP,

3687: cursor curs_noitype is
3688: select /*+ ORDERED USE_NL (WIASP WI WPAP WAP)
3689: INDEX (WIASP WF_ITEM_ACTIVITY_STATUSES_N1) */
3690: WIASP.ROWID ROW_ID
3691: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3692: WF_ITEMS WI,
3693: WF_PROCESS_ACTIVITIES WPAP,
3694: WF_ACTIVITIES WAP
3695: where WIASP.PROCESS_ACTIVITY = WPAP.INSTANCE_ID

Line 3706: from WF_ITEM_ACTIVITY_STATUSES WIASC,

3702: and WAP.TYPE = 'PROCESS'
3703: and WIASP.ACTIVITY_STATUS = 'ACTIVE' --use literal to force index
3704: and not exists
3705: (select null
3706: from WF_ITEM_ACTIVITY_STATUSES WIASC,
3707: WF_PROCESS_ACTIVITIES WPAC
3708: where WAP.ITEM_TYPE = WPAC.PROCESS_ITEM_TYPE
3709: and WAP.NAME = WPAC.PROCESS_NAME
3710: and WAP.VERSION = WPAC.PROCESS_VERSION

Line 3755: from WF_ITEM_ACTIVITY_STATUSES WIASP,

3751: begin
3752: select
3753: WIASP.ITEM_TYPE, WIASP.ITEM_KEY, WIASP.PROCESS_ACTIVITY
3754: into l_itemtype, l_itemkey, l_actid
3755: from WF_ITEM_ACTIVITY_STATUSES WIASP,
3756: WF_PROCESS_ACTIVITIES WPAP,
3757: WF_ACTIVITIES WAP,
3758: WF_ITEMS WI
3759: where WIASP.PROCESS_ACTIVITY = WPAP.INSTANCE_ID

Line 3770: from WF_ITEM_ACTIVITY_STATUSES WIASC,

3766: and WAP.TYPE = wf_engine.eng_process
3767: and WIASP.ACTIVITY_STATUS = 'ACTIVE' --use literal to force index
3768: and not exists
3769: (select null
3770: from WF_ITEM_ACTIVITY_STATUSES WIASC,
3771: WF_PROCESS_ACTIVITIES WPAC
3772: where WAP.ITEM_TYPE = WPAC.PROCESS_ITEM_TYPE
3773: and WAP.NAME = WPAC.PROCESS_NAME
3774: and WAP.VERSION = WPAC.PROCESS_VERSION

Line 4259: from WF_ITEM_ACTIVITY_STATUSES

4255:
4256: -- Cursor to select deferred activities to remove from background queue
4257: cursor defact is
4258: select PROCESS_ACTIVITY, BEGIN_DATE
4259: from WF_ITEM_ACTIVITY_STATUSES
4260: where ITEM_TYPE = itemtype
4261: and ITEM_KEY = itemkey
4262: and ACTIVITY_STATUS = wf_engine.eng_deferred;
4263:

Line 4411: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES ias

4407:
4408: l_lock boolean;
4409: cursor openNotifications is -- <7513983>
4410: SELECT wn.notification_id
4411: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES ias
4412: WHERE ias.item_type = itemtype
4413: AND ias.item_key = itemkey
4414: AND ias.notification_id is not null
4415: AND ias.notification_id = wn.group_id

Line 4419: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES_H iash

4415: AND ias.notification_id = wn.group_id
4416: AND wn.status = 'OPEN'
4417: UNION
4418: SELECT wn.notification_id
4419: FROM wf_notifications wn, WF_ITEM_ACTIVITY_STATUSES_H iash
4420: WHERE iash.item_type = itemtype
4421: AND iash.item_key = itemkey
4422: AND iash.notification_id is not null
4423: AND iash.notification_id = wn.notification_id

Line 4585: from WF_ITEM_ACTIVITY_STATUSES

4581: -- Cursor to select deferred activities to restart.
4582: cursor defact is
4583: select
4584: PROCESS_ACTIVITY, BEGIN_DATE
4585: from WF_ITEM_ACTIVITY_STATUSES
4586: where ITEM_TYPE = itemtype
4587: and ITEM_KEY = itemkey
4588: and ACTIVITY_STATUS = wf_engine.eng_deferred;
4589:

Line 4837: FROM wf_item_activity_statuses wias

4833: p_process in varchar2) is
4834:
4835: cursor suspended_items(p_itemType in varchar2) is
4836: SELECT distinct wias.item_key
4837: FROM wf_item_activity_statuses wias
4838: WHERE wias.item_type = p_itemType
4839: AND wias.activity_status = wf_engine.eng_suspended;
4840:
4841: cursor all_suspended_items is

Line 4843: FROM wf_item_activity_statuses wias

4839: AND wias.activity_status = wf_engine.eng_suspended;
4840:
4841: cursor all_suspended_items is
4842: SELECT distinct wias.item_type, wias.item_key
4843: FROM wf_item_activity_statuses wias
4844: WHERE wias.activity_status = wf_engine.eng_suspended;
4845:
4846: begin
4847:

Line 5132: from wf_item_activity_statuses

5128: ASSIGNED_USER, NOTIFICATION_ID,
5129: BEGIN_DATE, END_DATE, EXECUTION_TIME,
5130: ERROR_NAME, ERROR_MESSAGE, ERROR_STACK,
5131: OUTBOUND_QUEUE_ID, DUE_DATE
5132: from wf_item_activity_statuses
5133: where item_type = itemtype
5134: and item_key = copy_itemkey;
5135:
5136: cursor all_activities_hist is

Line 5143: from wf_item_activity_statuses_h

5139: ASSIGNED_USER, NOTIFICATION_ID,
5140: BEGIN_DATE, END_DATE, EXECUTION_TIME,
5141: ERROR_NAME, ERROR_MESSAGE, ERROR_STACK,
5142: OUTBOUND_QUEUE_ID, DUE_DATE
5143: from wf_item_activity_statuses_h
5144: where item_type = itemtype
5145: and item_key = copy_itemkey;
5146:
5147:

Line 5156: from wf_item_activity_statuses

5152: ASSIGNED_USER, NOTIFICATION_ID,
5153: BEGIN_DATE, END_DATE, EXECUTION_TIME,
5154: ERROR_NAME, ERROR_MESSAGE, ERROR_STACK,
5155: OUTBOUND_QUEUE_ID, DUE_DATE
5156: from wf_item_activity_statuses
5157: where item_type = itemtype
5158: and item_key = copy_itemkey
5159: and notification_id is not null
5160: and activity_status = 'NOTIFIED'

Line 5335: insert into wf_item_activity_statuses

5331:
5332: end if;
5333:
5334: -- now insert the status
5335: insert into wf_item_activity_statuses
5336: (ITEM_TYPE, ITEM_KEY, PROCESS_ACTIVITY,
5337: ACTIVITY_STATUS, ACTIVITY_RESULT_CODE,
5338: ASSIGNED_USER, NOTIFICATION_ID,
5339: BEGIN_DATE, END_DATE, EXECUTION_TIME,

Line 5362: insert into wf_item_activity_statuses_h

5358: hist.item_key, itemkey, nid);
5359: end if;
5360:
5361: -- now insert the status
5362: insert into wf_item_activity_statuses_h
5363: (ITEM_TYPE, ITEM_KEY, PROCESS_ACTIVITY,
5364: ACTIVITY_STATUS, ACTIVITY_RESULT_CODE,
5365: ASSIGNED_USER, NOTIFICATION_ID,
5366: BEGIN_DATE, END_DATE, EXECUTION_TIME,

Line 5380: update wf_item_activity_statuses ias

5376: end loop;
5377:
5378: -- update any active functions to notified state
5379: begin
5380: update wf_item_activity_statuses ias
5381: set activity_status = wf_engine.eng_notified
5382: where item_type = itemtype
5383: and item_key = itemkey
5384: and activity_status = 'ACTIVE'

Line 5751: from WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA

5747: -- Look up activity instance label
5748: begin
5749: select WPA.PROCESS_NAME, WPA.INSTANCE_LABEL
5750: into process, label
5751: from WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA
5752: where WIAS.ITEM_TYPE = itemtype
5753: and WIAS.ITEM_KEY = itemkey
5754: and WIAS.ACTIVITY_STATUS = wf_engine.eng_notified
5755: and WIAS.PROCESS_ACTIVITY = WPA.INSTANCE_ID

Line 6221: from WF_ITEM_ACTIVITY_STATUSES ias,

6217: cursor actc(x_itemtype varchar2, x_itemkey varchar2, x_activity varchar2) is
6218: select ias.ITEM_KEY,
6219: pa.INSTANCE_LABEL activity,
6220: pa.INSTANCE_ID actid
6221: from WF_ITEM_ACTIVITY_STATUSES ias,
6222: WF_PROCESS_ACTIVITIES pa
6223: where ias.ITEM_TYPE = x_itemtype
6224: and (x_itemkey is null or ias.ITEM_KEY = x_itemkey)
6225: and (x_activity is null or pa.INSTANCE_LABEL = x_activity)

Line 6395: from wf_item_activity_statuses ias,

6391: ias.assigned_user,
6392: ias.notification_id NID,
6393: ntf.status,
6394: ias.performed_by
6395: from wf_item_activity_statuses ias,
6396: wf_process_activities pa,
6397: wf_activities ac,
6398: wf_activities ap,
6399: wf_items i,

Line 6441: from wf_item_activity_statuses

6437: (
6438: select process_activity,
6439: activity_status,
6440: activity_result_code
6441: from wf_item_activity_statuses
6442: where item_type = itemtype
6443: and item_key = itemkey
6444: and activity_status <> wf_engine.eng_completed
6445: order by decode(activity_status, 'ERROR',1, 'NOTIFIED',2, 'DEFERRED',3,

Line 6665: FROM WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA,

6661:
6662: -- Blocked activities waiting for event (if existing process)
6663: cursor evtacts is
6664: SELECT WIAS.PROCESS_ACTIVITY actid
6665: FROM WF_ITEM_ACTIVITY_STATUSES WIAS, WF_PROCESS_ACTIVITIES WPA,
6666: WF_ACTIVITIES WA
6667: WHERE WIAS.ITEM_TYPE = event.itemtype
6668: AND WIAS.ITEM_KEY = event.itemkey
6669: AND WIAS.ACTIVITY_STATUS = 'NOTIFIED'

Line 6904: FROM WF_ITEM_ACTIVITY_STATUSES WIAS,

6900:
6901: -- Blocked activities waiting for event (if existing process)
6902: cursor evtacts is
6903: SELECT /*+ LEADING(WA) */ WIAS.ITEM_TYPE, WIAS.ITEM_KEY, WIAS.PROCESS_ACTIVITY ACTID
6904: FROM WF_ITEM_ACTIVITY_STATUSES WIAS,
6905: WF_PROCESS_ACTIVITIES WPA,
6906: (
6907: SELECT /*+ NO_MERGE */ WA.*
6908: FROM WF_ACTIVITIES WA

Line 7237: FROM wf_item_activity_statuses wias,

7233: IS
7234: SELECT wias.item_key,
7235: wpa.process_name,
7236: wpa.instance_label activity
7237: FROM wf_item_activity_statuses wias,
7238: wf_process_activities wpa
7239: WHERE wias.item_type = x_item_type
7240: AND (x_item_key IS NULL OR wias.item_key = x_item_key)
7241: AND (x_process IS NULL OR wpa.process_name = x_process)

Line 7249: FROM wf_item_activity_statuses_h wiash

7245: AND wias.process_activity = wpa.instance_id
7246: AND wias.activity_status = 'ERROR'
7247: AND x_max_retry >=
7248: (SELECT count(1)
7249: FROM wf_item_activity_statuses_h wiash
7250: WHERE wiash.item_type = wias.item_type
7251: AND wiash.item_key = wias.item_key
7252: AND wiash.process_activity = wias.process_activity
7253: AND wiash.action = 'RETRY');