文档介绍:
SOA 中一种基于规则的异常处理方法
徐艳婷,邓芳**
(北京邮电大学计算机学院,北京 100876)
5
10
摘要:面向服务的架构(SOA)是一种以业务为中心 IT 架构方法,它能够集成可重用的业务
流程以及服务。业务流程执行语言(BPEL)是 SOA 中将服务组合成完整业务流程的理想方法。
然而,在完整业务流程执行过程中,由于 Web 服务本身所具有的分布性,异构性以及不稳定
性常常会产生大量的异常。尽管业务流程执行语言提供了一些异常处理的方法,但是使用这
些方法进行异常处理将会加重业务流程设计人员的负担,并且增加了业务流程和异常处理之
间的耦合。本文中提出了一种基于规则的方法,采用统一的方式来处理异常。本方法考虑到
Web 服务的可靠性和可扩展性,提高了规则系统进行异常处理时性能。最后文中还提出了一
种基于规则的异常处理架构(REHF)来实现该方法。
关键词:异常;规则引擎;面向服务的架构;业务流程执行语言;Web 服务
中图分类号:TP399
15
A RULE-BASED APPROACH FOR EXCEPTION
HANDLING IN SOA
XU Yanting, Deng Fang
(Comupter School, Beijing University of Posts and munications, Beijing 100876)
20
25
30
35
40
Abstract: Service Oriented Architecture (SOA) is a paradigm for the realization and maintenance
of business processes that span large distributed systems. Business Process Execution Language
(BPEL) provides an ideal way posite services within SOA plete business processes.
However, the distributed, heterogeneous and highly volatile nature of web service will cause many
exceptions during execution of plete business processes. Although BPEL provides some
items for exception handling, the use of these items bring in additional work for the business
process designer and increase the coupling between BPEL and error handling. In this paper, we
present a rule-based approach for exception handling in a unified way. The approach takes the
reliability and the extensibility of web services into consideration. Such approach improves the
performance of the rule-based system when handling exceptions. We also propose a rule-based
exception handling framework (REHF) to implement this approach.
Keywords: exception; rule-based engine; SOA; BPEL; Web Service
0 引言
面向服务的架构(SOA)是一种实现和维护跨越大型分布式系统的业务流程的标准模式。
它能够集成可重用的业务流程以及服务。在 SOA 中,服务作为最基本的元素,可以独立开
发,也可以重用已有的服务。每个服务都是一个可以自我描述,可组装的开发的软件组件。
[1]
各种各样的细粒度的不同功能的服务或业务流程组合成需要的粗粒度的业务流程。服务组合
指的是一组具有自治性、异构性的 web 服务间的互操作。BPEL 提供了一种 SOA 下将服务
组合成完整业务流程的理想方法。[3]
Web 服务通常要依赖互联网,而互联网的连接是高度不可靠的。Web 服务常常会因为
逻辑错