[Home] [Help]
120: WHERE item_key = p_item_key
121: AND document_type = 'BR';
122:
123:
124: wf_engine.CreateProcess ( ItemType => l_ItemType,
125: ItemKey => l_ItemKey,
126: Process => 'SUBMIT_REVISION' );
127:
128: --
128: --
129: -- Set budget_revision_id as the Item User Key for the process.
130: --
131:
132: WF_Engine.SetItemUserKey
133: (
134: ItemType => l_ItemType ,
135: ItemKey => l_ItemKey ,
136: UserKey => l_budget_revision_id
138:
139: --
140: -- Populate item type.
141: --
142: wf_engine.SetItemAttrNumber( ItemType => l_ItemType,
143: ItemKey => l_itemkey,
144: aname => 'BUDGET_REVISION_ID',
145: avalue => l_budget_revision_id );
146: --
143: ItemKey => l_itemkey,
144: aname => 'BUDGET_REVISION_ID',
145: avalue => l_budget_revision_id );
146: --
147: wf_engine.SetItemAttrText( ItemType => l_itemtype,
148: ItemKey => l_itemkey,
149: aname => 'SUBMITTER_ID',
150: avalue => p_submitter_id );
151: --
148: ItemKey => l_itemkey,
149: aname => 'SUBMITTER_ID',
150: avalue => p_submitter_id );
151: --
152: wf_engine.SetItemAttrText( ItemType => l_itemtype,
153: ItemKey => l_itemkey,
154: aname => 'SUBMITTER_NAME',
155: avalue => p_submitter_name );
156:
154: aname => 'SUBMITTER_NAME',
155: avalue => p_submitter_name );
156:
157: /* Bug 2576222 Start */
158: wf_engine.SetItemAttrtext( ItemType => l_ItemType,
159: ItemKey => l_itemkey,
160: aname => 'FROM_ROLE',
161: avalue => g_user_name );
162: /* Bug 2576222 End */
160: aname => 'FROM_ROLE',
161: avalue => g_user_name );
162: /* Bug 2576222 End */
163: --
164: wf_engine.SetItemAttrText( ItemType => l_itemtype,
165: ItemKey => l_itemkey,
166: aname => 'OPERATION_TYPE',
167: avalue => p_operation_type );
168:
166: aname => 'OPERATION_TYPE',
167: avalue => p_operation_type );
168:
169: --
170: wf_engine.SetItemAttrNumber( ItemType => l_ItemType,
171: ItemKey => l_itemkey,
172: aname => 'LOOP_VISITED_COUNTER',
173: avalue => 0 );
174:
172: aname => 'LOOP_VISITED_COUNTER',
173: avalue => 0 );
174:
175: --
176: wf_engine.SetItemAttrText( ItemType => l_itemtype,
177: ItemKey => l_itemkey,
178: aname => 'ORIG_SYSTEM',
179: avalue => p_orig_system );
180: --
177: ItemKey => l_itemkey,
178: aname => 'ORIG_SYSTEM',
179: avalue => p_orig_system );
180: --
181: wf_engine.SetItemAttrNumber( ItemType => l_itemtype,
182: ItemKey => l_itemkey,
183: aname => 'OPERATION_ID',
184: avalue => p_operation_id );
185: --
182: ItemKey => l_itemkey,
183: aname => 'OPERATION_ID',
184: avalue => p_operation_id );
185: --
186: wf_engine.SetItemAttrNumber( ItemType => l_itemtype,
187: ItemKey => l_itemkey,
188: aname => 'CONSTRAINT_SET_ID',
189: avalue => p_constraint_set_id );
190: --
198: SELECT comments INTO l_comments
199: FROM psb_ws_submit_comments
200: WHERE operation_id = p_operation_id;
201: --
202: wf_engine.SetItemAttrText( ItemType => l_itemtype,
203: ItemKey => l_itemkey,
204: aname => 'COMMENTS',
205: avalue => l_comments );
206: END IF;
210: Loop
211: l_justification := C_Justification_Rec.justification;
212: End Loop;
213:
214: wf_engine.SetItemAttrText( ItemType => l_itemtype,
215: ItemKey => l_itemkey,
216: aname => 'JUSTIFICATION',
217: avalue => l_justification );
218:
223:
224:
225: g_requestor_name := l_requestor_name;
226:
227: wf_engine.SetItemAttrText( ItemType => l_itemtype,
228: ItemKey => l_itemkey,
229: aname => 'REQUESTOR_NAME',
230: avalue => l_requestor_name );
231: --
230: avalue => l_requestor_name );
231: --
232: -- Start the process
233: --
234: wf_engine.StartProcess ( ItemType => l_ItemType,
235: ItemKey => l_ItemKey );
236:
237: --
238: FND_MSG_PUB.Count_And_Get ( p_count => p_msg_count,
281: IF ( funcmode = 'RUN' ) THEN
282: --
283: -- Get budget_revision_id item_attribute.
284: --
285: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
286: itemkey => itemkey,
287: aname => 'BUDGET_REVISION_ID');
288:
289: --
295: FROM psb_budget_revisions_v
296: WHERE budget_revision_id = l_budget_revision_id;
297:
298: --
299: wf_engine.SetItemAttrText ( itemtype => itemtype,
300: itemkey => itemkey,
301: aname => 'BUDGET_GROUP_NAME',
302: avalue => l_budget_group_name );
303: --
358: IF ( funcmode = 'RUN' ) THEN
359: --
360: -- Get operation_type item_attribute.
361: --
362: l_budget_revision_id := wf_engine.GetItemAttrNumber
363: ( itemtype => itemtype,
364: itemkey => itemkey,
365: aname => 'BUDGET_REVISION_ID' );
366:
363: ( itemtype => itemtype,
364: itemkey => itemkey,
365: aname => 'BUDGET_REVISION_ID' );
366:
367: l_operation_type := wf_engine.GetItemAttrText
368: ( itemtype => itemtype,
369: itemkey => itemkey,
370: aname => 'OPERATION_TYPE' );
371: --
449: IF ( funcmode = 'RUN' ) THEN
450: --
451: -- Get budget_revision_id item_attribute.
452: --
453: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
454: itemkey => itemkey,
455: aname => 'BUDGET_REVISION_ID');
456:
457: l_operation_type := wf_engine.GetItemAttrText
453: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
454: itemkey => itemkey,
455: aname => 'BUDGET_REVISION_ID');
456:
457: l_operation_type := wf_engine.GetItemAttrText
458: ( itemtype => itemtype,
459: itemkey => itemkey,
460: aname => 'OPERATION_TYPE' );
461:
461:
462: --
463: -- Find constraint_set_id optionally needed for validation.
464: --
465: l_constraint_set_id := wf_engine.GetItemAttrNumber
466: ( itemtype => itemtype,
467: itemkey => itemkey,
468: aname => 'CONSTRAINT_SET_ID' );
469:
545: IF ( funcmode = 'RUN' ) THEN
546: --
547: -- Get budget_revision_id item_attribute.
548: --
549: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
550: itemkey => itemkey,
551: aname => 'BUDGET_REVISION_ID');
552: --
553: l_operation_type := wf_engine.GetItemAttrText( itemtype => itemtype,
549: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
550: itemkey => itemkey,
551: aname => 'BUDGET_REVISION_ID');
552: --
553: l_operation_type := wf_engine.GetItemAttrText( itemtype => itemtype,
554: itemkey => itemkey,
555: aname => 'OPERATION_TYPE');
556: --
557: -- Operation_type item attribute determines what operation is to
638: IF ( funcmode = 'RUN' ) THEN
639: --
640: -- Get budget_revision_id item attribute.
641: --
642: l_budget_revision_id := wf_engine.GetItemAttrNumber
643: (itemtype => itemtype,
644: itemkey => itemkey,
645: aname => 'BUDGET_REVISION_ID');
646: --
643: (itemtype => itemtype,
644: itemkey => itemkey,
645: aname => 'BUDGET_REVISION_ID');
646: --
647: l_submitter_name := wf_engine.GetItemAttrText
648: ( itemtype => itemtype,
649: itemkey => itemkey,
650: aname => 'SUBMITTER_NAME' );
651: --
648: ( itemtype => itemtype,
649: itemkey => itemkey,
650: aname => 'SUBMITTER_NAME' );
651: --
652: l_operation_type := wf_engine.GetItemAttrText
653: ( itemtype => itemtype,
654: itemkey => itemkey,
655: aname => 'OPERATION_TYPE' );
656:
868: IF ( funcmode = 'RUN' ) THEN
869: --
870: -- Get budget_revision_id item_attribute.
871: --
872: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
873: itemkey => itemkey,
874: aname => 'BUDGET_REVISION_ID');
875: -- commented for bug 4341619
876: /*For C_global_revision_rec in C_global_revision
934:
935: end if;
936:
937: if(l_error_code <> 'NO_ERR') then
938: wf_engine.SetItemAttrText( ItemType => itemtype,
939: ItemKey => itemkey,
940: aname => 'NOTIFICATION_SUBJECT',
941: avalue => l_subject );
942:
939: ItemKey => itemkey,
940: aname => 'NOTIFICATION_SUBJECT',
941: avalue => l_subject );
942:
943: wf_engine.SetItemAttrText( ItemType => itemtype,
944: ItemKey => itemkey,
945: aname => 'NOTIFICATION_BODY',
946: avalue => l_body );
947: end if;
1015: IF ( funcmode = 'RUN' ) THEN
1016: --
1017: -- Get budget_revision_id item_attribute.
1018: --
1019: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1020: itemkey => itemkey,
1021: aname => 'BUDGET_REVISION_ID');
1022:
1023: l_operation_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1019: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1020: itemkey => itemkey,
1021: aname => 'BUDGET_REVISION_ID');
1022:
1023: l_operation_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1024: itemkey => itemkey,
1025: aname => 'OPERATION_ID');
1026:
1027: --
1127: IF ( funcmode = 'RUN' ) THEN
1128: --
1129: -- Get budget_revision_id item_attribute.
1130: --
1131: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1132: itemkey => itemkey,
1133: aname => 'BUDGET_REVISION_ID');
1134:
1135: -- Bug#3259142: Use display_name instead of name from wf dir.
1147: result := 'COMPLETE:NO' ;
1148: ELSE
1149: result := 'COMPLETE:YES' ;
1150:
1151: wf_engine.SetItemAttrText( ItemType => itemtype,
1152: ItemKey => itemkey,
1153: aname => 'OVERRIDE_APPROVER',
1154: avalue => l_override_approver );
1155:
1152: ItemKey => itemkey,
1153: aname => 'OVERRIDE_APPROVER',
1154: avalue => l_override_approver );
1155:
1156: wf_engine.SetItemAttrText( ItemType => itemtype,
1157: ItemKey => itemkey,
1158: aname => 'APPROVER_NAME',
1159: avalue => l_approver_name );
1160:
1158: aname => 'APPROVER_NAME',
1159: avalue => l_approver_name );
1160:
1161: -- Added for bug 3394080
1162: wf_engine.SetItemAttrText( ItemType => itemtype,
1163: ItemKey => itemkey,
1164: aname => 'APPROVER_DISPLAY_NAME',
1165: avalue => l_approver_display_name );
1166: END IF ;
1218: IF ( funcmode = 'RUN' ) THEN
1219: --
1220: -- Get reviewed_flag item_attribute.
1221: --
1222: l_reviewed_flag := wf_engine.GetItemAttrText
1223: ( itemtype => itemtype,
1224: itemkey => itemkey,
1225: aname => 'REVIEWED_FLAG' );
1226:
1291: IF ( funcmode = 'RUN' ) THEN
1292: --
1293: -- Get budget_revision_id item_attribute.
1294: --
1295: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1296: itemkey => itemkey,
1297: aname => 'BUDGET_REVISION_ID');
1298: --
1299: l_submitter_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1295: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1296: itemkey => itemkey,
1297: aname => 'BUDGET_REVISION_ID');
1298: --
1299: l_submitter_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1300: itemkey => itemkey,
1301: aname => 'SUBMITTER_ID');
1302:
1303: l_submission_status := wf_engine.GetItemAttrText( itemtype => itemtype,
1299: l_submitter_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1300: itemkey => itemkey,
1301: aname => 'SUBMITTER_ID');
1302:
1303: l_submission_status := wf_engine.GetItemAttrText( itemtype => itemtype,
1304: itemkey => itemkey,
1305: aname => 'SUBMISSION_STATUS');
1306: --
1307: -- Call API to find all lower level worksheets.
1447: IF ( funcmode = 'RUN' ) THEN
1448: --
1449: -- Get budget_revision_id item_attribute.
1450: --
1451: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1452: itemkey => itemkey,
1453: aname => 'BUDGET_REVISION_ID');
1454: --
1455: -- Update the baseline values in Position Control Tables
1549: IF ( funcmode = 'RUN' ) THEN
1550: --
1551: -- Get budget_revision_id item_attribute.
1552: --
1553: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1554: itemkey => itemkey,
1555: aname => 'BUDGET_REVISION_ID');
1556:
1557: SELECT currency_code INTO l_currency_code
1561:
1562: --
1563: --
1564: -- Bug#4310411 Start
1565: l_operation_type := wf_engine.GetItemAttrText
1566: (itemtype => itemtype,
1567: itemkey => itemkey,
1568: aname => 'OPERATION_TYPE'
1569: );
1675: IF ( funcmode = 'RUN' ) THEN
1676: --
1677: -- Get budget_revision_id item_attribute.
1678: --
1679: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1680: itemkey => itemkey,
1681: aname => 'BUDGET_REVISION_ID');
1682: --
1683: -- Setting context for the CALLBACK procedure.
1686: g_itemtype := itemtype ;
1687: g_itemkey := itemkey ;
1688: g_budget_revision_id := l_budget_revision_id ;
1689:
1690: g_budgetgroup_name := wf_engine.GetItemAttrText
1691: ( itemtype => itemtype,
1692: itemkey => itemkey,
1693: aname => 'BUDGET_GROUP_NAME'
1694: );
1789: IF ( funcmode = 'RUN' ) THEN
1790: --
1791: -- Get budget_revision_id item_attribute.
1792: --
1793: l_budget_revision_id := wf_engine.GetItemAttrNumber( itemtype => itemtype,
1794: itemkey => itemkey,
1795: aname => 'BUDGET_REVISION_ID');
1796: --
1797: -- Unfreeze only the current worksheet.
1874: IF ( funcmode = 'RUN' ) THEN
1875: --
1876: -- Get budget_revision_id item_attribute.
1877: --
1878: l_budget_revision_id := wf_engine.GetItemAttrNumber
1879: ( itemtype => itemtype,
1880: itemkey => itemkey,
1881: aname => 'BUDGET_REVISION_ID'
1882: );
1911: -- Committing as the users on_exit settings may be ROLLBACK.
1912: --
1913: COMMIT ;
1914:
1915: wf_engine.SetItemAttrNumber( ItemType => itemtype,
1916: ItemKey => itemkey,
1917: aname => 'LOOP_SET_COUNTER',
1918: avalue => g_num_approvers );
1919: --
1971: IF ( funcmode = 'RUN' ) THEN
1972: --
1973: -- Get budget_revision_id item_attribute.
1974: --
1975: l_budget_revision_id := wf_engine.GetItemAttrNumber
1976: ( itemtype => itemtype,
1977: itemkey => itemkey,
1978: aname => 'BUDGET_REVISION_ID'
1979: );
1977: itemkey => itemkey,
1978: aname => 'BUDGET_REVISION_ID'
1979: );
1980:
1981: l_count := wf_engine.GetItemAttrNumber
1982: ( itemtype => itemtype,
1983: itemkey => itemkey,
1984: aname => 'LOOP_SET_COUNTER'
1985: );
1984: aname => 'LOOP_SET_COUNTER'
1985: );
1986:
1987:
1988: l_loop_visited_counter := wf_engine.GetItemAttrNumber
1989: ( itemtype => itemtype,
1990: itemkey => itemkey,
1991: aname => 'LOOP_VISITED_COUNTER'
1992: );
2049: IF l_approver_name IS NULL THEN
2050: RAISE NO_DATA_FOUND;
2051: End If;
2052:
2053: wf_engine.SetItemAttrText( ItemType => itemtype,
2054: ItemKey => itemkey,
2055: aname => 'APPROVER_NAME',
2056: avalue => l_approver_name );
2057:
2055: aname => 'APPROVER_NAME',
2056: avalue => l_approver_name );
2057:
2058: -- Added for bug 3394080
2059: wf_engine.SetItemAttrText( ItemType => itemtype,
2060: ItemKey => itemkey,
2061: aname => 'APPROVER_DISPLAY_NAME',
2062: avalue => l_approver_display_name );
2063: end if;
2062: avalue => l_approver_display_name );
2063: end if;
2064:
2065:
2066: wf_engine.SetItemAttrNumber( ItemType => ItemType,
2067: ItemKey => ItemKey,
2068: aname => 'LOOP_VISITED_COUNTER',
2069: avalue => l_loop_visited_counter );
2070: result := 'COMPLETE' ;
2120: BEGIN
2121:
2122: IF ( funcmode = 'RUN' ) THEN
2123:
2124: wf_engine.SetItemAttrText( ItemType => itemtype,
2125: ItemKey => itemkey,
2126: aname => 'REVIEWED_FLAG',
2127: avalue => 'Y' );
2128:
2216: /*
2217: IF ( command = 'SET' ) THEN
2218: --
2219: IF attr_name = 'REPLY' THEN
2220: wf_engine.SetItemAttrText( ItemType => g_itemtype,
2221: ItemKey => g_itemkey,
2222: aname => 'OPERATION_TYPE',
2223: avalue => 'XXX' );
2224:
2294: --
2295: p_return_status := FND_API.G_RET_STS_SUCCESS ;
2296: --
2297:
2298: WF_Engine.CreateProcess
2299: (
2300: ItemType => l_ItemType,
2301: ItemKey => l_ItemKey,
2302: Process => 'DISTRIBUTE_REVISION'
2312:
2313: --
2314: -- Set budget_revision_id as the Item User Key for the process.
2315: --
2316: WF_Engine.SetItemUserKey
2317: (
2318: ItemType => l_ItemType ,
2319: ItemKey => l_ItemKey ,
2320: UserKey => l_budget_revision_id
2320: UserKey => l_budget_revision_id
2321: );
2322:
2323: --
2324: WF_Engine.SetItemAttrNumber
2325: (
2326: ItemType => l_ItemType,
2327: ItemKey => l_itemkey,
2328: aname => 'BUDGET_REVISION_ID',
2329: avalue => l_budget_revision_id
2330: );
2331:
2332: --
2333: WF_Engine.SetItemAttrText
2334: (
2335: ItemType => l_ItemType,
2336: ItemKey => l_itemkey,
2337: aname => 'DISTRIBUTION_INSTRUCTIONS',
2338: avalue => p_distribution_instructions
2339: );
2340:
2341: --
2342: WF_Engine.SetItemAttrText
2343: (
2344: ItemType => l_ItemType,
2345: ItemKey => l_itemkey,
2346: aname => 'RECIPIENT_NAME',
2347: avalue => p_recipient_name
2348: );
2349:
2350: --
2351: WF_Engine.StartProcess
2352: (
2353: ItemType => l_ItemType,
2354: ItemKey => l_ItemKey
2355: );
2423: IF ( funcmode = 'RUN' ) THEN
2424: --
2425: -- Get Requestor Name item_attribute.
2426: --
2427: l_requestor_name := WF_Engine.GetItemAttrNumber
2428: (
2429: itemtype => itemtype,
2430: itemkey => itemkey,
2431: aname => 'REQUESTOR_NAME'
2430: itemkey => itemkey,
2431: aname => 'REQUESTOR_NAME'
2432: );
2433:
2434: l_submitter_name := WF_Engine.GetItemAttrNumber
2435: (
2436: itemtype => itemtype,
2437: itemkey => itemkey,
2438: aname => 'SUBMITTER_NAME'
2499: /* Bug 2576222 End */
2500: --
2501: -- Get budget_revision_id item_attribute.
2502: --
2503: l_budget_revision_id := WF_Engine.GetItemAttrNumber
2504: (
2505: itemtype => itemtype,
2506: itemkey => itemkey,
2507: aname => 'BUDGET_REVISION_ID'
2515: FROM psb_budget_revisions_v
2516: WHERE budget_revision_id = l_budget_revision_id;
2517:
2518: --
2519: WF_Engine.SetItemAttrText
2520: (
2521: itemtype => itemtype,
2522: itemkey => itemkey,
2523: aname => 'BUDGET_GROUP_NAME',
2524: avalue => l_budget_group_name
2525: );
2526:
2527: /* Bug 2576222 Start */
2528: wf_engine.SetItemAttrtext( ItemType => ItemType,
2529: ItemKey => Itemkey,
2530: aname => 'FROM_ROLE',
2531: avalue => l_user_name );
2532: /* Bug 2576222 End */
2569: BEGIN
2570:
2571: IF ( funcmode = 'RUN' ) THEN
2572:
2573: wf_engine.SetItemAttrText( ItemType => itemtype,
2574: ItemKey => itemkey,
2575: aname => 'SUBMISSION_STATUS',
2576: avalue => 'A' );
2577: result := 'COMPLETE' ;
2614: BEGIN
2615:
2616: IF ( funcmode = 'RUN' ) THEN
2617:
2618: wf_engine.SetItemAttrText( ItemType => itemtype,
2619: ItemKey => itemkey,
2620: aname => 'SUBMISSION_STATUS',
2621: avalue => 'R' );
2622: result := 'COMPLETE' ;
2671: l_operation_type VARCHAR2(20);
2672: BEGIN
2673: --
2674: IF ( funcmode = 'RUN' ) THEN
2675: l_budget_revision_id := wf_engine.GetItemAttrNumber
2676: (
2677: itemtype => itemtype,
2678: itemkey => itemkey,
2679: aname => 'BUDGET_REVISION_ID'
2678: itemkey => itemkey,
2679: aname => 'BUDGET_REVISION_ID'
2680: );
2681:
2682: l_operation_type := wf_engine.GetItemAttrText
2683: (
2684: itemtype => itemtype,
2685: itemkey => itemkey,
2686: aname => 'OPERATION_TYPE'