Note: Descriptions are shown in the official language in which they were submitted.
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
Description
METHOD AND APPARATUS FOR SELF-HEALING
COMPOSITE WEB SERVICES
Technical Field
[001] The present invention relates to a method and apparatus for healing
composite web
services, and particularly relates to a method and apparatus to provide
composite web
services with self healing ability, a method and apparatus for executing the
composite
web services having self healing ability, and a composite web services
processing
method having self healing ability.
Background Art
[002] The growth of Internet technologies has unleashed a wave of innovations
that are
having a tremendous impact on the way organizations interact with their
partners and
customers. In particular,cornposite web services technology is emerging as a
promising
technology for the effective automation of business-to-business
collaborations.
[003] A web service can be defined as the self contained, self describing
modular ap-
plication that can be published, located, and invoked across the web. The web
services
can be composed to form new services. Hereinafter, a new web services process
composed of multiple web services is referred to as a composite web services
process.
The creation of a composite web services process from individual web services
is
called web services composition, that is, to combine existing services (or
building
blocks) to form a new service. A composite web service is a composition of
multiple
partner web services (elementary web services) which interact according to a
predefined services flow model. The partner web service described above can be
an
elementary web service or a composite web service itself. By integrating
partner's web
services, a composite web service provides customers with a composite web
service
and satisfies customers' complex requirements. Generally,a composite web
service is
defined by a web services process model. For example, a composite web service
TravelAgezzt may aggregate multiple web services such as flight bookizzg,
travel
insurance, accommodation bookizzg, car rental, itizzerazy plarzzzi>zg, etc.
which are
executed sequentially or concurrently according to the web services process
model.
Figure 1 shows the exemplary TravelAgezzt service of the composite web
services.
Customs issue a request to the TravelAgerzt service, based on which the
TravelAgezzt
service invokes airline services, hotel services, and car rezztal services,
and in order to
carry out the above services, "bank services" should be invoked. ,
[004] Next, standards relating to web services process are described first.
IBM's WSFL
(Web Service Flow Language) and Microsoft's XLANG (eXtensible language) are
two
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
2
of the earliest languages to define standards for web service composition.
WSFL
defines a specific order of activities and data exchanges for a particular
process. It
defines both the execution sequence and the mapping of each step in the flow
to the
specific operations. WSFL supports the handling of exceptions but has no
direct
support for transactions. XLANG focuses on the creation of business process
and the
interactions among web service providers. It includes a robust exception
handling
facility, with support for running long transactions through compensation.
[005] The web services workflow specifications outlined by WFSL and XLANG have
recently been replaced by a new specification from IBM, Microsoft, and BEA,
i.e.
BPEL4WS (Business Process Execution Language for Web Services). BPEL4WS
models the behavior of web services in a business process interaction. The
spec-
ification provides an AML-based grammar for describing the control logic and
data
exchange required to coordinate web services participating in a business flow.
The web
services can then be interpreted and executed by a web services process
engine, e.g.,
BPWS4J, which executes an instance of the web services process. During
execution,
the web services process can invoke a number of partners' web services. Figure
2
shows the schematic diagram of BPEL4WS process. In Figure 2, the BPEL4WS
process includes multiple steps, some of which invoke web services outside.
The
customers issue a request to BPEL4WS process via WSDL (Web Service Describing
Language) and acquire a reply. The process has the characteristics such as
exception
handling and transactional characteristics differentiating roles and partners,
persistence
and adaptability.
[006] In order to attract and retain customers as well as business partners,
the composite
web services need to be executed in a consistent and reliable way. In
particular, it is
crucial for the web services process to meet the service objectives committed
to the
customers even in the case of the failure of the partners. Taking the
TravelAge>zt
service mentioned above as an example,let us assume that a flight ticket from
China
Southern Airline has been booked. According to the predefined business
process,a car
should be rented from the New Concept Car Rental Company, but some system
errors
occur with the web services of that rental company, e.g., communication
failure,
system shutdown. If the web services process of TravelAgezzt cannot recover
from this
failure, the TravelAgezzt service has to return 'sorry' to the customer for
being unable
to rent the car. From the viewpoint of the customer, the quality of this
TravelAge>zt is
low and unreliable. But if the TzavelAgent can recover from the failure, the
customer's
requirements may be met ultimately. The reliable quality of the service will
attract and
retain the customer.
[007] Therefore, it is desired that when failures occur with the partners' web
services of
the composite web services, self healing can be achieved. Self healing means
that the
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
3
web services process has a capability to continue to execute and meet its
original
service objective even when its partner web service fails. According to one
automatic
computing solution proposed by IBM, self-healing means the system can
discover,
diagnose, and react to disruptions.The system is able to recover from a failed
component by first detecting the failed component, then taking it off-line to
be fixed or
isolated, and finally reintroducing the fixed or replacement component into
service
without any apparent application disruption. The system predicts possible
problems
and take actions to prevent the failure from impacting on applications.
[008] However there is currently no apparent other solution to make composite
web
services self-healing.The possible solutions include:
[009] (1) Using a special service platform to guarantee reliability.
Apparently, if the
partner services are all reliable, the composite web services process could be
executed
with a reliable quality. At present, some special service platforms, such as
IBM's
Service Domain, can offer reliable elementary web services so that the service
providers can provide reliable web services for collaboration. However the
drawback
of this solution is that it is difficult for the providers of composite web
services
constructed by the web services process to require all their partners to buy
and adopt
the special, private service platforms required to ensure the reliability of
partners' web
services.
[010] (2) Using a web services process engine to provide healing mechanisms to
ensure
the reliability.aaf the composite web services.However, such healing
mechanisms.
maybe implemented in the engine are fixed and invisible, probably with a few
con-
figuration functions. The stakeholders of the composite web services process,
such as
the provider and the administrator, cannot customize or control those healing
mechanisms.
[O11] US patent No. 6,330,689 Bl discloses a system architecture with
detection and
recovery of failed out-of process application, wherein detection is performed
by
recording and examining the log, and recovery is performed by restarting a
crashed ap-
plication.However, the solution described in US6,330,689 cannot achieve real-
time
recovery.
[012] US patent publication No. 200210007468 Al discloses a method and system
for
achieving high availability of a network computer system.The global high
availability
is achieved by providing each component with high availability. However in the
composite web services, it is not practical for all the partners' web services
to have
high availability.
[013] US patent publication No. 2003/0144894 A1 discloses a system and method
for
creating and managing permanent services provided via the web, which is
directed to
self healing of individual service. The solution described in US
2003/0144894A1 uses
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
4
a managing agent mode to detect and rebuild the failed individual service,
search for
the rebuilt service in real time, and invoke the service again. The patent
requires that
each service should follow the managing agent mode defined by it so as to
achieve re-
liability of the service.
Disclosure of Invention
[014] A first embodiment of the present invention makes the composite web
services
process recoverable in the case of failures of its partner web services, so as
to avoid the
composite web service process being interrupted or aborted due to the
partners'
failures.
[O15] A further embodiment of the present invention provides a flexible and
platform-
independent method for a self healing web services process. It conducts self-
monitoring and self-recovery, so as to ensure that the web services can
survive with
low cost so that the customers of the web services can still be offered the
required
services even when a partner of the web services fails.
[016] The present invention provides a self-healing method for processing a
composite
web services process, said composite web services process invoking at least
one
elementary web service. The method comprises the steps of: providing the
elementary
web service with at least one alternative web service, which is independent of
said
elementary web service and implements the same function as that of the
corresponding
elementary web service; parsing the model definition of said composite web
services
process to search the steps that activate the invocation of the elemenl'~ry
web service;
inserting healing logics after said steps that activate the invocation of the
elementary
web service, which are searched from the model definition of said composite
web
services process. And during the procedure of executing said composite web
services
process, said healing logic detecting whether the previous invocation of the
elementary
web service is failed or not, and in the case of detection of an invocation
failure, said
healing logic invoking said alternative web service corresponding to the
elementary
web service which failed to be invoked.
[017] The present invention further provides a self-healing apparatus for
processing a
composite web services process, said composite web services process invoking
at least
one elementary web service. The apparatus comprises: an alternative web
service
repository for providing the elementary web service with at least one
alternative web
service, which is independent of said elementary web service and implements
the same
function as that of the corresponding elementary web service; a model parsing
means
for parsing the model definition of said composite web services process to
identify the
steps that activate the invocation of the elementary web service; a healing
logic
inserting means for inserting healing logics after said steps that activate
the invocation
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
of the elementary web service, which are identified from the model definition
of said
composite web services process. And during the procedure of executing said
composite
web services process, said healing logic detecting whether the previous
invocation of
the elementary web service is failed or not, and in the case of detection of
an
invocation failure, said healing logic invoking said alternative web service,
cor-
responding to the elementary web service which failed to be invoked, from the
al-
ternative web service repository.
[018] The present invention further provides an apparatus for executing a
composite web
services process which invokes at least one elementary web service. The
apparatus is
used along with an alternative web service repository in which the elementary
web
service is provided with at least one alternative web service, which is
independent of
said elementary web service and executes the same function as that of the cor-
responding elementary web service. The apparatus comprises: a self healing
component for determining whether the invocation is successful after said
apparatus
executes the invocation of the elementary web service according to the
composite web
services process. In the case that an invocation failure is determined to have
occurred
the self-healing component will invoke an alternative web service,
corresponding to
the elementary web service which was not invoked successfully, from the
alternative
web service repository.
[019] The present invention further provides a method for executing a
composite web
services process which invokes at least one elementary web service. The method
comprises: determining whether the invocation is successful after executing
the
invocation of the elementary web service; and in the case that an invocation
failure is
determined to have occurred invoking, from the alternative web service
repository, an
alternative web service corresponding to the elementary web service which was
not
invoked successfully. In the said alternative web service repository, the
elementary
web service is provided with at least one alternative web service, which is
independent
of said elementary web service and implements the same function as that of the
cor-
responding elementary web service.
[020] The advantages of the present invention are:
[021] (1) The present invention is more feasible than adopting a specific
services
platform. The present invention is independent of the platform, which ensures
re-
liability on the composite web service process level and has no special
requirement to
the service platform providing the web service of the partner. That is, the
present
invention does not require the web service of each partner to achieve high
availability.
In the loose-coupled web services era, it is more feasible.
[022] (2) It can change on demand (stakeholder-oriented). The present
invention allows
the stakeholders of the composite web services to customize the healing
mechanisms
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
6
and those healing mechanisms can be integrated easily into the composite web
service
process on demand.
[023] (3) Low-cost. If a partner does not fail, the services process is not
influenced at all.
If a partner fails, the services process just executes another invocation.
Although
invoking another service will bring a little performance cost, it guarantees
the re-
liability of the whole process. Consider the following scenario: a composite
web
services process needs to invoke 100 partner services, the first 99 invocation
succeed,
but the last one fails. Without the disclosed method herein, the whole process
instance
would fail, and the first 99 partners' work would be negated too. But with the
method
of the present invention, the services process continues to execute, that is,
one
candidate web service for the web service of the failed partner is invoked and
result is
returned. Thus, the first 99 partners' work is maintained and cost of the
composite web
service is reduced.
Brief Description of the Drawings
[024] With the description of the exemplary embodiments of the present
invention in
conjunction with the accompanying drawings, the above and other aspects and
advantages of the present invention will become more apparent, wherein:
[025] Figure 1 shows an example of composite web services;
[026] Figure 2 shows a schematic diagram of BPEL4WS process;
[027] Figure 3 schematically shows related apparatus for providing the
composite web
services process with self healing ability~~ccording to the present invention;
[028] Figure 4 shows the flow chart of a method for providing the composite
web services
process with self healing ability according to the present invention;
[029] Figure 5 shows the flow chart of the elementary process of the healer;
[030] Figure 6 shows the flow chart of the self-healing of the composite web
services
process;
[031] Figure 7A shows an example of BPEL4WS process;
[032] Figure 7B shows the self healing BPEL4WS process of the example shown in
the
Figure 7A;
[033] Figure 8 shows how the process engine invokes the partner's web services
as
activity implementation; and
[034] Figure 9 shows the self healing process engine according to the present
invention.
Mode for the Invention
[035] A web services process delivered from the process designer to the
service provider
is provided in a declarative form such as an AML document instead of
traditional
unreadable binary code. The present invention automatically analyzes the
business
process, and then inserts healing logics into appropriate places within the
business
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
7
process logic. Those healing logics ensure the web services process continues
to meet
the original requirements of the users in the case of the failure of the
partner web
services, without impacting the original business process described in the XML
document. At the same time, the healing logics comply with the specification
of the
business process, such as BPEL4WS or WSFL, complying with its grammar and
semantic definition so as to implement self-containing. The web services
process
including healing logics can be referred to as a self healing web services
process. The
self healing web services process can be deployed and executed on any
specification-
compliant process execution platform (process engine). When the self healing
web
services process is performed on the process engine, if the partners' web
services fail,
the healing logics first detect and record the failed partner web services,
and introduce
the healer invoking the alternative web services into the business process
without any
apparent disruption. The partner services and their alternative services are
predefined
in the partner services register. After the partner services fail, the
alternative services
can be invoked simply by querying the register.The business process continues
to meet
the original requirements.
[036] A method and related apparatus for providing the composite web services
process
with self healing ability according to the present invention will be described
in detail
with reference to Figures 3-5.
[037] Figure 3 schematically shows related apparatus for providing the
composite web
services process with self healing~ability according to the present invention.
The
apparatus includes partner web services repository, healing generator, and
healer
generating apparatus. Figure 4 shows the flow chart of a method for providing
the
composite web services process with self healing ability according to the
present
invention.
[038] As an example, in the model of composite web services process as shown
in Figure
3, first the step 1 is performed, then the steps 2A and 2.B are performed in
parallel,
finally the step 3 is performed, wherein the steps 2A and ~,B invoke web
services
"WS2A" and "WS2B" respectively.
[039] The partner web services repository is a container for alternative web
services,
wherein the web services WS2A and WS2B to be invoked in the composite web
services process are provided with multiple alternative web services
WS2A alternative_1 to WS2,A_alternative n and WS2B alternative_1 to
WS2B alternative n respectively. The alternative web services provide the same
func-
tionality but are offered by the different services providers. For example,
the flight
booking service of China Eastern Airline is the alternative service of flight
bookirag
service of China Southern Airline. Actual providers can register with the
partner
services web repository of interest to offer the desired service. The partner
web
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
8
services repository will be used when one partner web service in the composite
web
services process is unavailable. The alternative web service in the
corresponding
repository will be selected and be invoked instead of the unavailable partner
web
services. For example, in the composite web service process TravelAgefat, if
the fligl2.t
booking service of China Southern Airline fails, the flight booking service of
China
Eastern Airline will be invoked and delegated to book flight.
[040] In the partner web services repository, the alternative web services can
be assigned
different invocation levels, according to an alterfzative-web-serviee-
selection- policy.
The selection policy can be constituted based on any ranking algorithm
involving
parameters such as services' availability, so that the self healing process
can invoke al-
ternative web services according to the ranks.
[041] Healing generator includes model parsing apparatus, healing logic
generating
apparatus, and healing logic inserting apparatus, which are used to further
process the
existing composite web services process model definition. At step 5410 of
Figure 4,
the model parsing apparatus parses a step in the composite web services
process model
definition to search the steps that activates the invocation of partner web
services
therein, e.g., step 2A and step 2B in Figure 3, and at step 5420, it is
determined
whether this step in the model definition will invoke partner web services. If
it is
determined that a partner web services will not be invoked at step 5420, the
flow
proceeds to step 5460, which will be described below. If it is determined that
a partner
web services will be.invoked at step 5420, the healing logic generating
apparatus ,~,.;
generates healing logic at step 5430, and at step 5440 the healing logic
inserting
apparatus inserts the generated healing logic following the step (2A, 2B) that
activates
the invocation of the partner web services as searched in the model definition
of the
composite web services process, such as the steps 2A-H, 2B-H in the self-
healing
process model in Figure 3, which are used to respectively detect whether the
invocation of the partner web services in the preceding steps 2A and 2B are
successful.
The healing logic can determine whether the invocation of the partner web
services is
successful according to whether the partners' reply is obtained.
[042] At step 5450, the healer generating apparatus generates healer
corresponding to the
healing logic, such as WS2A-Healer and WS2B-Healer in Figure 3. The healer
will be
described in detail below.
[043] At step S460, it is determined whether the web services model ends. If
it is
determined that it ends, the method of the present invention ends. If it is
determined
that it does not end, the process returns to the step 5410, in which the next
step in the
model definition is parsed.
[044] The healer will be described in detail below. The healer itself is a web
service,
which can invoke an alternative web service of the partner web service from
the
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
partner web service repository to get the desired service in case that the
partner web
service is unavailable. For example, if the partner web service WS2A is
unavailable,
the output of step 2A is system-level exception. The system-level exception
means an
exception occurred due to the system failure, network failure, and application
fault. In
this case, the healing logic 2A-H will invoke the healer WS2A-Healer. Figure 5
shows
the flow chart of the elementary process of the healer. At step 5510, the
healer
WS2A-Healer chooses an alternative web service to be invoked according to the
afore-
mentioned alter~eative-web-service-selection policy, e.g. WS2A_alternative_1,
and
invokes the alternative web service at step 5520. The healer can further
record when
and which partner web service is unavailable as a log of the collaboration
with that
partner web service provider. The healer can also communicate with partner web
service repository and take part in evaluating the alternative web service
invocation
level.
[045] Through the above process, the existing composite web services process
becomes a
self healing composite web services process having self healing capability,
which is
executed on the web services process engine. The self healing process of the
composite web services process will be described below with reference to
Figure 6. At
step 5610, the respective steps of the composite web services process are
executed
according to the model definition of the composite web services process. At
step 5620,
the partner web service is invoked according to the request of the composite
web
~Wservices process. And it is determined whether the invocation is swecessful
at step
5630. If it is determined that the invocation is successful, the process
proceeds to the
step 5650. If it is determined that the invocation is failed, the healer web
service is
invoked at step 5640. An alternative web service is invoked by the healer web
service.
At step 5650, it is determined whether the composite web services process ends
by the
step. If it does not end, the process returns to the step 5610 to continue
executing the
composite web services process. If it ends, the self-healing process ends.
[046] An embodiment based on BPEL,4WS according to the method disclosed in the
present invention will be described below with reference to Figures 7A and 7B.
Figure
7A shows an example of BPEL4WS process, wherein a customer sends a request for
a
loan, the request gets processed, and the customer finds out whether the loan
request
was approved. In the process, the behavior consists of getting a message,
invoking the
financial institution's web service, and finally replying to the customer.
These three
actions are defined in BPEL using the <receive>, <invoke>, and <reply>
activities.
The relationship among such activities, which is defined by using structured
activities,
defines restrictions on how to run these activities. In this example, the
ordering may be
achieved using a <sequence> activity so that the activities would run one
after another.
Figure 7B shows a self-healing BPEL4WS process of the example. It is different
in
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
that when the output result of the <invoke> is exception, the process will
invoke the
Healer Web Service which invokes the alternative partner service so as to
ensure the
reliability of the BPEL4WS process.
[047] The implementation steps of this example are as follows:
[048] (1) First, parse the web service process document loanapproval.bpel to
search the
activity (<invoke> fcnancial service) which invokes partner web service
(financial
service) and get the information of the partner web service.
[049] (2) Generate a healer web service that invoking an alternative web
service of the
partner web service. The information required for invocation, such as the name
and
address of the alternative web service, can be got from the partner web
services
repository and the corresponding service WSDL.
[050] (3) Insert the <switch> and <invoke> activities following the step of
invoking
partner web service so as to invoke the healer web service in the case of the
failure of
the before invoked partner web service.
[051] (4) Deploy the process, the related partner web services and healer web
services.
[052] (5) Execute the self healing composite web services process on the
process engine.
[053] The method and apparatus described above add healing logics into the
composite
web services process and the web services process is then executed on the
process
engine, so as to ensure the reliability of the composite web services process.
The
method according to the present invention can also be changed to be employed
by the
web service process executing engine. That is, the;composite web services
process
itself is not changed, and instead, the healing process is executed by the web
services
process. Hereinafter, "web services process executing engine" is briefly
called
"process engine".
[054] First, process engine will be described briefly. Along with the
composite web
services process specifications, a few tools for the specifications are
offered. For
example, IBM provides a process engine called BPWS4J on which composite web
services processes can be executed. The composite web services process engine
takes
in a composite web services process definition document describing a business
process
to be executed, WSDL documents describing the partner web services, and a WDSL
document describing the interface of the resulting business process to the
clients. From
this input, the process engine generates a process made available as a web
service with
a SOAP (Service-Oriented Architecture and Programming) interface. A WDSL file
that describes the process's interface may be retrieved at run-time. The
engine also
supports the invocation, from within the process, of web services. Figure 8
shows how
the process engine invokes the partner web services as activity
implementation. After
being defined, the process model is input to the process engine via service
requester.
The process engine executes the corresponding process, communicates with the
service
CA 02555697 2006-08-09
WO 2005/091186 PCT/EP2005/051089
11
invocation utility which sends a SOAP message to the web services provider's
SOAP
handler, so as to invoke the services in its services container, and returns a
SOAP
message to the service invocation utility.
[055] Figure 9 shows the self healing process engine according to the present
invention.
The composite web services process engine can handle the failure of the
partner web
service by inserting a healing component into the composite web services
process
engine. Just like the aforementioned healing logics, the healing component
detects
whether the past invocation failed. If so, it will invoke the alternative web
service of
the failed partner web service through the service invocation utility. Its
workflow is
similar to the self healing process disclosed above, and the only difference
is that the
self healing is handled in the process engine, rather than the process itself.
The
advantage of executing the present invention in the process engine is that the
process
model is not changed itself. The process engine is responsible for the
reliability of the
running composite web services process. The disadvantage is that the healing
component is fixed and invisible for the stake-holder of the running process.
[056] Although the present invention has been described and shown in detail
with
reference to the preferred embodiments of the present invention, those skilled
in the art
should understand that various modifications in forms and details may be made
without departing from the spirit and scope of the present invention as
defined by the
appended claims.