从同步BPEL服务调用异步BPEL服务时,我收到请求超时异常。
我处于学习阶段,创建了一个只需等待5秒的异步bpel,并使用同步BPEL调用了它,但仍然收到了超时错误。被调用的异步流程在等待5秒后已完成,但即使到那时同步流程仍在等待响应。
当使用另一个异步bpel服务调用相同的异步服务时,它工作得很好。
为什么在使用同步服务调用异步bpel服务时出现此错误?
我尝试通过胡乱猜测将同步进程事务属性更改为‘requriesNew
异步进程
<?xml version = "1.0" encoding = "UTF-8" ?>
<!--
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Oracle JDeveloper BPEL Designer
Created: Wed Jan 30 16:13:48 IST 2013
Author: loganvm
Type: BPEL 1.1 Process
Purpose: Asynchronous BPEL Process
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-->
<process name="TestAsync"
targetNamespace="http://xmlns.oracle.com/BankInterestRate/TestAsyncproject/TestAsync"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:client="http://xmlns.oracle.com/BankInterestRate/TestAsyncproject/TestAsync"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:bpel2="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap">
<!--
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
PARTNERLINKS
List of services participating in this BPEL process
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-->
<partnerLinks>
<!--
The 'client' role represents the requester of this service. It is
used for callback. The location and correlation information associated
with the client role are automatically set using WS-Addressing.
-->
<partnerLink name="testasync_client" partnerLinkType="client:TestAsync" myRole="TestAsyncProvider" partnerRole="TestAsyncRequester"/>
</partnerLinks>
<!--
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
VARIABLES
List of messages and XML documents used within this BPEL process
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-->
<variables>
<!-- Reference to the message passed as input during initiation -->
<variable name="inputVariable" messageType="client:TestAsyncRequestMessage"/>
<!-- Reference to the message that will be sent back to the requester during callback -->
<variable name="outputVariable" messageType="client:TestAsyncResponseMessage"/>
<variable messageType="bpelx:bindingFault" name="FaultVar"/>
<variable messageType="bpelx:remoteFault" name="FaultVar_1"/>
</variables>
<faultHandlers>
<catch faultName="bpelx:bindingFault" faultVariable="FaultVar"/>
</faultHandlers>
<!--
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-->
<sequence name="main">
<!-- Receive input from requestor. (Note: This maps to operation defined in TestAsync.wsdl) -->
<receive name="receiveInput" partnerLink="testasync_client" portType="client:TestAsync" operation="process" variable="inputVariable" createInstance="yes"
bpelx:conversationId="1"/>
<assign name="assign_hello">
<bpelx:append>
<bpelx:from expression="concat(bpws:getVariableData('inputVariable','payload','/client:process/client:input'),' Hello')"/>
<bpelx:to variable="outputVariable" part="payload"
query="/client:processResponse/client:result"/>
</bpelx:append>
</assign>
<wait name="Wait1" for="'PT5S'"/>
<!--
Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
-->
<invoke name="callbackClient" partnerLink="testasync_client" portType="client:TestAsyncCallback" operation="processResponse" inputVariable="outputVariable"
bpelx:invokeAsDetail="no" bpelx:conversationId="1"/>
</sequence>
</process>发布于 2013-03-12 13:31:41
要调试此问题的:
audit,在开发模式下运行,然后从测试控制台运行 synchronous process 。这将向您显示流程流、调用和同步进程等待的位置。
发布于 2016-08-25 03:52:37
尝试在事务属性中添加这些组合中的任何一个。
bpel.config.transaction=required
bpel.config.oneWayDeliveryPolicy=async.persist如果上面的配对没有帮助...尝试仅在下面添加并注释掉bpel.config.transaction属性
bpel.config.oneWayDeliveryPolicy=async.persisthttps://stackoverflow.com/questions/14645001
复制相似问题