使用“onEvent”进行 Oracle BPEL 事件处理活动和商务活动

发布于 2024-12-11 21:31:04 字数 615 浏览 0 评论 0原文

我正在尝试使用 bpel 扩展在 soa suite 11g ps3 下进行事件处理。我正在尝试从事件传递网络订阅事件,但收到错误。

这就是代码:

<eventHandlers>
  <onEvent bpelx:eventName="ns4:discountEvent" variable="discEvent" >
    <scope name="Scope1">
      <sequence name="Sequence1">
        <exit name="Exit1"/>
      </sequence>
    </scope>
  </onEvent>
</eventHandlers>

编译器给出以下错误:

Error(52): Activity <bpel:onEvent> must have "element", "messageType" attribute present.

我找不到有关在“onEvent”活动中使用扩展的任何信息。

任何帮助表示赞赏!

谢谢,克里斯

I'm trying to use the bpel extension for eventhandling under the soa suite 11g ps3. I'm trying to subscribe to an event from the event delivery network but I get an error.

That's the code:

<eventHandlers>
  <onEvent bpelx:eventName="ns4:discountEvent" variable="discEvent" >
    <scope name="Scope1">
      <sequence name="Sequence1">
        <exit name="Exit1"/>
      </sequence>
    </scope>
  </onEvent>
</eventHandlers>

The compiler is giving me the following error:

Error(52): Activity <bpel:onEvent> must have "element", "messageType" attribute present.

I can't find any information on using the extension in an "onEvent" activity.

Any help appreciated!

Thanks, Chris

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冷情 2024-12-18 21:31:05

事件处理程序的工作方式与其他交互活动略有不同。当接收、调用等操作先前定义的变量时,事件处理程序定义自己的变量,该变量在 onEvent 的子活动范围内可见。为了给这个变量一个类型,需要将 messageType 或元素标识为该变量的声明类型。这就是需要 element 或 messageType 的原因。

请在下面找到 BPEL 2.0 规范的相关引用:

变量属性(如果存在)标识事件处理程序的本地变量,该变量将包含从合作伙伴接收到的消息。 [SA00087] messageType 属性通过使用其 QName 引用消息类型定义来指定变量的类型。变量的类型(由 messageType 属性指定)必须与操作属性引用的操作定义的输入消息的类型相同。可选地,如果要接收的消息具有单个部分并且该部分是用元素类型定义的,则可以省略 messageType 属性,并且替代地用元素属性替代。该元素类型必须与元素属性引用的元素类型完全匹配。变量和消息类型/元素属性构成了事件处理程序关联范围内该名称和类型的变量的隐式声明。如果使用元素属性,则按照第 10.4 节中为接收活动指定的那样,将传入消息绑定到事件处理程序中声明的变量。提供Web服务操作——接收和回复。

Event handlers work slightly different than other interaction activities. While receive, invoke etc. work on previously defined variables, the event handler defines its own variable which is visible in the scope of the onEvent's child activity. In order to give this variable a type, either a messageType or an element needs to be identified to be the declared type of the variable. This is why element or messageType is needed.

Please find below the related quote of the BPEL 2.0 spec:

The variable attribute, if it exists, identifies a variable local to the event handler that will contain the message received from the partner. [SA00087] The messageType attribute specifies the type of the variable by referencing a message type definition using its QName. The type of the variable (as specified by the messageType attribute) MUST be the same as the type of the input message defined by operation referenced by the operation attribute. Optionally the messageType attribute may be omitted and instead the element attribute substituted if the message to be received has a single part and that part is defined with an element type. That element type MUST be an exact match of the element type referenced by the element attribute. The variable and messageType/element attributes constitute the implicit declaration of a variable of that name and type within the associated scope associated of the event handler. If an element attribute is used then the binding of the incoming message to the variable declared in the event handler occurs as specified for the receive activity in section 10.4. Providing Web Service Operations – Receive and Reply .

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文