【问题标题】:Reply mechanism and Tx management in Oracle BPELOracle BPEL 中的回复机制和 Tx 管理
【发布时间】:2013-01-16 16:31:53
【问题描述】:

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

【问题讨论】:

  • 能否贴出两个进程的代码?我不确定我是否正确理解了这个问题,但是异步操作不会回复任何内容(因为它是异步的)。
  • 我不知道 bpelx 命名空间中的构造,但是您的同步进程是否有第二个接收,一个匹配异步进程中的调用,位于同步接收-回复对之间?如果您也粘贴同步过程的代码,它可能会有所帮助。
  • 能不能也贴一下Synchronous进程的源码,我只能看到async进程。

标签: web-services oracle soa bpel business-process-management


【解决方案1】:

调试这个问题:

  • 启用审核,以开发模式运行,然后运行同步过程从测试控制台。这将向您展示流程、调用和同步流程等待的位置。

【讨论】:

    【解决方案2】:

    尝试在交易属性中添加任何这些组合。

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

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

    bpel.config.oneWayDeliveryPolicy=async.persist
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多