提交并发请求时使用FUNCTION FND_CONCURRENT.WAIT_FOR_REQUEST等待子并发程序完成
来源:互联网 发布:淘宝如何找相似 编辑:程序博客网 时间:2024/05/22 00:47
在提交并发请求的时候,有些情况需要调用其他的并发程序去处理相应的事务,此时父并发请求进入等待状态,当子程序完成之后接着去处理其他的业务,为了实现这种情况需要使用到FUNCTION FND_CONCURRENT.WAIT_FOR_REQUEST 这个功能。
示例
log('begin call Import Standard Purchase Orders'); l_request_id := fnd_request.submit_request('PO', 'POXPOPDOI', '', to_char(SYSDATE, 'YYYY/MM/DD HH24:MI:SS'), FALSE, NULL, 'STANDARD', NULL, 'N', NULL, 'INCOMPLETE', --'APPROVED', NULL, NULL, lt_org_id, NULL, chr(0)); log(l_request_name || ' Interface Request Submmit.l_request_id=' || l_request_id); COMMIT;--注意这个commit需要写上,不然会有问题
l_wait_req := fnd_concurrent.wait_for_request(request_id => p_request_id, INTERVAL => 1, max_wait => 1000, phase => l_child_phase, status => l_child_status, dev_phase => l_dev_phase, dev_status => l_dev_status, message => l_message); x_wait_req := l_wait_req; x_dev_phase := l_dev_phase; x_dev_status := l_dev_status; x_message := l_message;
fnd_concurrent.wait_for_request 参考
Problem Description:
The following describes how to submit concurrent requests using PL/SQL and
have the parent request ‘wait’ until each of the child processes have
completed before it completes.
Search Words: WAIT_FOR_REQUEST phase status arguments interval
Solution Description:
When submitting concurrent requests using PL/SQL, it is often desired to have
the parent process wait until all the child processes have completed before
completing itself. The following describes the function used to accomplish
this.
Use the FND_CONCURRENT.WAIT_FOR_REQUEST function documented in the Oracle
Applications Developer’s Guide, RELEASE 11i, Page 21-8 See the FND_CONCURRENT.WAIT_FOR_REQUEST
function description.
Summary
FUNCTION FND_CONCURRENT.WAIT_FOR_REQUEST
(request_id IN number default NULL,
interval IN number default 60,
max_wait IN number default 0,
phase OUT varchar2,
status OUT varchar2,
dev_phase OUT varchar2,
dev_status OUT varchar2,
message OUT varchar2) return boolean;
Description
Wait for the request completion, then return the request phase/status and
completion message to the caller. Also call sleep between database checks.
Arguments (input)
request_id
The request ID of the program to wait on.
interval
Time to wait between checks. This is the number of seconds to sleep.
The default is 60 seconds.
max_wait
The maximum time in seconds to wait for the requests completion.
Arguments (output)
phase
The user friendly request phase from FND_LOOKUPS.
status
The user friendly request status from FND_LOOKUPS.
dev_phase
The request phase as a constant string that can be used for program
logic comparisons.
dev_status
The request status as a constant string that can be used for program
logic comparisons.
message
The completion message supplied if the request has completed.
- 提交并发请求时使用FUNCTION FND_CONCURRENT.WAIT_FOR_REQUEST等待子并发程序完成
- FUNCTION FND_CONCURRENT.WAIT_FOR_REQUEST
- Oracle Form中调用并发请求生成报表并输出为PDF的方法 (FND_CONCURRENT.WAIT_FOR_REQUEST)
- fnd_concurrent.wait_for_request
- [Java并发]使用CountDownLatch和CyclicBarrier等待多线程完成
- 2.8.等待多个并发完成
- 并发编程--等待多个并发事件的完成
- nginx子请求并发处理
- 关于FND_REQUEST.SUBMIT_REQUEST和 FND_CONCURRENT.WAIT_FOR_REQUEST
- 关于FND_REQUEST.SUBMIT_REQUEST和 FND_CONCURRENT.WAIT_FOR_REQUEST
- 关于FND_REQUEST.SUBMIT_REQUEST和 FND_CONCURRENT.WAIT_FOR_REQUEST
- 设置并发请求运行的状态及请求间等待
- java多线程 等待多个并发事件的完成
- 等待多个并发事件完成的模型
- 并发工具类(一)等待多线程完成的CountDownLatch
- java多线程 等待多个并发事件的完成【转】
- 并发工具类(一)等待多线程完成的CountDownLatch
- curl多请求并发使用
- java中常用的时间处理类TimeUtil (未测试)
- UVA10004Bicoloring
- HDU(1016)搜索Prime Ring Problem
- studio中打印日志有部分乱码 可以尝试下列方式解决
- hdu 5734 Acperience 2016 Multi-University Training Contest 2
- 提交并发请求时使用FUNCTION FND_CONCURRENT.WAIT_FOR_REQUEST等待子并发程序完成
- Scanner,String
- 函数声明和函数表达式的(区别)应用场景注意事项
- iOS开发:UITableView自定义SectionHeader
- 防止重复提交
- Codeforces - 362 (Div. 2)B - Barnicle(模拟)
- C++ 字符串,字符数组,数字之间转换
- java搜索引擎爬虫,抓取url示例(未测试)
- js --- 闭包,垃圾回收机制