首页 > 代码库 > Receiving Transaction Processor Conundrum
Receiving Transaction Processor Conundrum
what would we do if we are faced with a situation to execute a receiving transaction in oracle ebusiness suite from a BPEL process in Oracle Fusion Middleware?
There are no public APIs provided as of this moment to execute the transactions. The only option is to use the receiving transaction processor. We would not want to invoke a concurrent program from a BPEL process and write wait & watch logic to check the outcome of the concurrent program. Could there be a better way? Let us dig deeper into how Oracle internally handles the receiving transactions.
Within the ebusiness suite system, there are 3 modes with which receiving can be done: Online, Immediate, Batch.
Immediate mode calls the receiving transaction processor as a concurrent request while the batch mode simply inserts the transactions into the receiving interface which could then be processed by a scheduled run of the receiving transaction processor.
What is of interest to us is this online mode. The online mode invokes the receiving transaction processor as a synchronous call bypassing the concurrent request submission. It is this mode that we can use to our advantage in a BPEL process to pull off our heist.
Synchronous calls can be done using fnd_transaction.synchronous API in the ebusiness suite system. The synchronous call to receiving transaction processor would be like this:
l_retvalue := fnd_transaction.synchronous( 300, -- timeout in seconds
l_outcome, -- out variable indicating Success/Warning/Error
l_message, -- out variable with a descriptive message
‘PO‘,
‘RCVTPO‘,
‘ONLINE‘,
l_group_id, -- group_id in rcv_transactions_interface
l_organization_id, -- inventory organization_id,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL);
Please note that Oracle internally makes this call for Online receiving transactions using POR_RCV_ORD_SV.Call_Txn_Processor routine.
There are a couple of things that we need to do before we make this synchronous call:
- Set the apps context
- Insert rows into receiving interface tables
- Specify processing_mode_code in rcv_transactions_interface as ‘ONLINE‘
To debug this routine, set the ‘CONC_DEBUG‘ profile to ‘TC‘ and watch for errors in the fnd_concurrent_debug_info table.
All of this could be wrapped up into a nice custom utility and we would be good to go!
Enjoy the serving!
Receiving Transaction Processor Conundrum
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。