BPEL<开关>元素不受支持。

发布于 2024-12-21 15:55:35 字数 251 浏览 4 评论 0原文

尝试在 BPEL 中使用 元素时出现以下错误。

BPEL element in namespace 
"http://docs.oasis-open.org/wsbpel/2.0/process/executable" 
is not supported by this implementation.

我需要用其他东西代替吗?它是否已从 BPEL 中删除?

I get the following error when trying to use a <switch> element in BPEL.

BPEL element in namespace 
"http://docs.oasis-open.org/wsbpel/2.0/process/executable" 
is not supported by this implementation.

Do I need to use something else instead? Was it removed from BPEL?

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

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

发布评论

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

评论(1

走野 2024-12-28 15:55:36

是 BPEL 1.1 的一部分,已在 BPEL 2.0 中删除。替换是 活动,可以按如下方式使用:(

<if xmlns:inventory="http://supply-chain.org/inventory" xmlns:FLT="http://example.com/faults">
  <condition>
    bpel:getVariableProperty('stockResult','inventory:level') > 100
  </condition>
  <flow>
    <!-- perform fulfillment work -->
  </flow>
  <elseif>
    <condition>
      bpel:getVariableProperty('stockResult','inventory:level') >= 0
    </condition>
    <throw faultName="FLT:OutOfStock" variable="RestockEstimate" />
  </elseif>
  <else>
    <throw faultName="FLT:ItemDiscontinued" />
  </else>
</if>

代码片段借用自 BPEL 2.0 规范)

<switch> was part of BPEL 1.1 and has been removed in BPEL 2.0. The replacement is the <if> activity, which can be used as follows:

<if xmlns:inventory="http://supply-chain.org/inventory" xmlns:FLT="http://example.com/faults">
  <condition>
    bpel:getVariableProperty('stockResult','inventory:level') > 100
  </condition>
  <flow>
    <!-- perform fulfillment work -->
  </flow>
  <elseif>
    <condition>
      bpel:getVariableProperty('stockResult','inventory:level') >= 0
    </condition>
    <throw faultName="FLT:OutOfStock" variable="RestockEstimate" />
  </elseif>
  <else>
    <throw faultName="FLT:ItemDiscontinued" />
  </else>
</if>

(snippet is borrowed from the BPEL 2.0 spec)

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