2

从同步 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>
4

2 回答 2

0

要调试此问题:

  • 启用审计,在开发模式下运行,然后从测试控制台运行同步过程。这将向您展示流程、调用和同步流程等待的位置。
于 2013-03-12T05:31:40.767 回答
0

尝试在事务属性中添加任何这些组合。

bpel.config.transaction=required
bpel.config.oneWayDeliveryPolicy=async.persist

如果以上对没有帮助...尝试在下面添加并注释掉 bpel.config.transaction 属性

bpel.config.oneWayDeliveryPolicy=async.persist
于 2016-08-24T19:52:37.277 回答