scieee AI-readable full text Open interactive document viewer

A survey using constraints to decision-making for fault tolerance in Business processes

Gómez López, María Teresa; Martínez Gasca, Rafael; Arévalo Maldonado, Carlos

Abstract

Sometimes the business processes do not work how it is expected. In these cases, a diagnosis process has to be executed to determine the responsible activity or activities of the fault in order to substitute it or them for a correct activity. The aim of this paper is describe the necessary steps to find out another service that can replace it in an efficient way. In order to automate the search and substitution of activities, we propose to describe the functionality of the tasks using constraints, making easier the determination of the possible activities that could substitute everyone faulty activities in the business process. In this paper, it is also analyzed how to adapt the communication protocol with XML messages to a behavior described using constraints.

Full text

International Journal of Software Engineering and Its Applications International Journal of Software Engineering and Its ApplicationsInternational Journal of Software Engineering and Its Applications International Journal of Software Engineering and Its Applications Vol. Vol. Vol. Vol. 4 44 4, No. , No., No. , No. 4 44 4, , , , October OctoberOctober October 20 2020 2010 1010 10 79 A survey using constraints to decision-making for fault tolerance in Business processes M. T. Gómez-López, Rafael Martínez Gasca and Carlos Arévalo Maldonado E.T.S de Ingeniería Informática. Departamento de Lenguajes y Sistemas Informáticos, Universidad de Sevilla, Spain {maytegomez,gasca,carlosarevalo}@us.es Abstract Sometimes the business processes do not work how it is expected. In these cases, a diagnosis process has to be executed to determine the responsible activity or activities of the fault in order to substitute it or them for a correct activity. The aim of this paper is describe the necessary steps to find out another service that can replace it in an efficient way. In order to automate the search and substitution of activities, we propose to describe the functionality of the tasks using constraints, making easier the determination of the possible activities that could substitute everyone faulty activities in the business process. In this paper, it is also analyzed how to adapt the communication protocol with XML messages to a behavior described using constraints. Keywords: Business Process, Fault tolerance, Constraint Satisfaction Problem. 1. Introduction A business process consists of a set of activities that are performed in coordination in an organizational and technical environment [1]. While a Business Process Management (BPM) includes concepts, methods, and techniques to support the design, administration, configuration, enactment, and analysis of business process. The base of BPM is the explicit representation of business processes with their activities and the execution constraints between them. In order to describe the workflow of the process, it is possible to use constraints to model de conditions that define the instance executed for each example, but it is also possible to describe the behavior/semantics of the activities using constraints. A business process instance represents a certain case in the operational business for a model. Each business process model acts as a blueprint for a set of business process instances. When an execution of a business process is monitored, some errors could be detected. The diagnosis process is used to determine which activity or activities are responsible of the incorrect behavior in the full business process. In this paper, we are centered in the business processes that fail for certain instances, or its behavior does not correspond with the expected. Fault diagnosis and diagnosability have been analyzed in previous works [2], since the transformation and adaptation of Artificial Intelligence techniques used in classic diagnosis [3][4] to process business management is not automatic. One of the most important problems in diagnosis of business process is derived from the distribution of the model and that there is no a global knowledge of the system behavior. Related to BPM diagnosis, there are works related to conflicts detection (CDM - Conflict Detecting Mechanism), where the specification of the services is described using XML to design meta-process [5]. The mentioned work is based on the detection of inconsistent activities. In CDM area, the conflicts are defined as a cause that violate and change the International Jou International JouInternational Jou International Journal of Software Engineering and Its Applications rnal of Software Engineering and Its Applicationsrnal of Software Engineering and Its Applications rnal of Software Engineering and Its Applications Vol. Vol. Vol. Vol. 4 44 4, No. , No., No. , No. 4 44 4, , , , October OctoberOctober October 20 2020 2010 1010 10 80 normal behavior or expected in an execution state for a business process. In order to detect errors, the business process area also uses the processes monitoring (BPMod-Business Process Monitoring) that is the query languages proposed in [6]. When a business process is formed by web services (WS), BPEL (Business Process Execution Language [7]) standard is very used. BPEL offers a language based on XML, it describes the process interface, its logic operations and its execution workflow. This language has also been used in fault tolerance area for web services [8]. In this work, we will consider that all the activities of a business process are executed by means of WS. When a fault is produced in the execution of a business process it is necessary to isolate the WS which is cause of this fault. Once the responsible WS of the malfunction is determined, this WS has to be substituted. The new WS has to satisfy the same precondition and postcondition of the original, it means to satisfy the same contract. There are works where weakest preconditions are analyzed, where predicates area transformed into another [29][30][31], to guaranty a safe substitution. It is also important that the substitution has to be done in an efficient way. In order to automate this process, it is necessary to know the formal specification of each WS (expressed as a conjunction or disjunction of constraints) and to have a repository with the possible substitutive web services. The use of constraints makes the decision making techniques more efficient to search a substitute service, since there are algorithms [9][10] to optimize the identification of constraints by means of queries to a Constraint Database (CDB) [21]. The search of a new WS, or a set of them, in order to replace an incorrect service imply three problems: • Representation of the WS functionality by means of a specification language same to a constraint language. • Storing the semantic description of the WS in a database to make this information persistent and easier an efficient search. • Efficient search of the best substitute WS, or the combination of some of them, to replace the incorrect WS. In this paper, all these aspects are analyzed in order to propose a methodology to help for the decision making in the business process orchestration for fault tolerance. Section 2 revises standard languages for WS semantic specification. Section 3 introduces how it is possible to represent WS contracts by means of constraints. Section 4 revises the definition of CDBs to store web services. Section 5 presents how selection operator can be used for an efficient search of the substitution of web services. Finally, in Section 6 conclusion and future works are presented. 2. Standard languages for web services semantic specification Here we make a compilation of the main standards for web services semantics specification and we emphasized its main characteristics. The industry standard Universal Description, Discovery and Integration (UDDI) [32] only supports classification (keyword) based search and does not capture the semantics of web International Journal of Software Engineering and Its Applications International Journal of Software Engineering and Its ApplicationsInternational Journal of Software Engineering and Its Applications International Journal of Software Engineering and Its Applications Vol. Vol. Vol. Vol. 4 44 4, No. , No., No. , No. 4 44 4, , , , October OctoberOctober October 20 2020 2010 1010 10 81 services functionality. To overcome this, some works have already been initiated towards a semantic description specification for web services, especially, the Web Ontology Language for Services (OWL-S) [33] specification. The OWL-S specification allows a WS to be specified in terms of its Inputs, Outputs, Pre-conditions, and Effects or Post-conditions (Preconditions and Post-conditions can be generalized as constraints, that is, characteristics of a service which need to be considered for successful execution of the WS). Another way to describe web services semantics is the Web Service Modeling Ontology (WSMO) [39] where precondition, postcondition, assumption and effects can be defined, hence it has a more complete semantics than OWL-S. The two major web standardization bodies are W3C and OASIS. The Web Service Description Language (WSDL) [34] [35] is a standard technology for describing the interface exposed by a service. In WSDL, contracts are basically limited to one-way (asynchronous) and request/response (synchronous) interactions. The Web Service Conversation Language (WSCL) [36] extends WSDL contracts by allowing the description of arbitrary, possibly cyclic sequences of exchanged messages between communicating parties. Other languages, such as the Web Service Business Execution Language (WS-BPEL) [37], provide even more detailed descriptions of services by defining the subprocess structure and more specific details regarding the service’s internals. Such descriptions can be approximated and compared in terms of contracts. Standard technologies are also available for building repositories of web service descriptions [38], making it possible to perform queries for services according to their contract. The WSDL message exchange patterns cover only the simplest forms of interaction between a client and a service. More involved forms of interactions cannot be captured if not as informal annotations within the WSDL interface. The Web service conversation language WSCL [36] provides a more general specification language for describing complex conversations between two communicating parties, by means of an activity diagram. 3. Representing web services by means of Constraints The term ‘Constraint’ is used in this paper as a relation between a set of variables defined over a domain [22] and related between them, where there is a limitation over the values for the instantiation of the variables. This relation between the variables can be described in a compact way using combination of equations and inequations by means of Boolean operators. The standard BPEL permits to describe both the process interface and logic operations and the workflow. The notation described by BPEL is based on the specific behavior of WS, represented in the bibliography as BPEL4WS. The processes in WPEL4WS exports and imports functionality using only the web service interfaces. The business processes can be described in two ways [7]: • Executable business processes model actual behavior of a participant in a business interaction. • Business protocols, in contrast, use process descriptions that specify the mutually visible message exchange behavior of each of the parties involved International Jou International JouInternational Jou International Journal of Software Engineering and Its Applications rnal of Software Engineering and Its Applicationsrnal of Software Engineering and Its Applications rnal of Software Engineering and Its Applications Vol. Vol. Vol. Vol. 4 44 4, No. , No., No. , No. 4 44 4, , , , October OctoberOctober October 20 2020 2010 1010 10 82 in the protocol, without revealing their internal behavior. The process descriptions for business protocols are called abstract processes. BPEL4WS is meant to be used to model the behavior of both executable and abstract processes. BPEL4WS provides a language for the formal specification of business processes and business interaction protocols. By doing so, it extends the Web Services interaction model and enables it to support business transactions. The following basic specifications originally defined the Web Services space: SOAP, Web Services Description Language (WSDL), and Universal Description, Discovery, and Integration (UDDI). SOAP defines an XML messaging protocol for basic service interoperability. WSDL introduces a common grammar for describing services. UDDI provides the infrastructure required to publish and discover web services in a systematic way. Together, these specifications allow applications to find each other and interact following a loosely coupled, platform independent model. The implementation M of a WS to develop a process has to satisfy a contract C. The contract can be described by means of a precondition and a postcondition represented with constraints. The use of constraints permits to check the correct behavior of the WS. It is also important that the WS have defined variables to be connected with other web services. There are variables are public variables associated with ports of connection, and private variables unknown outside the WS. If M satisfies contract C, and it is defined over the same public variables, it implies that M ⊆ C. In order to substitute M for another WS, it is necessary to find another WS implemented by M’, defined over the same public variables and that satisfy the assert M’ ⊆ C. Figure 1 shows an example where the web services are represented using constraints. This example uses a set con of web services that represent an orchestration of activities to carry out some investments in order to maximize the profits for a given quantity. For a determined quantity, the activity named Divide resource into different strategies is used to divide the money into different items. The different strategies are represented by means of the following activities: Invest in stock market, Invest in state, and Invest in sector company of research and develop. Each of these web services obtains a profit in function of the invested quantity and the inversion margin establish. It means that each service will receive a pair of values < investment , margin > from the Divide resource into different strategies service, thereby the total investment en each item will be investment ± margin . As output variable of the web services, the totalProfit will be obtained. It is possible that after a diagnosis process the service Invest in stock market is not working as it is expected, and it has to be substituted for a new one with an equivalent or compatible specification. In order to do that it is necessary to have the description of the web services, being possible the substitution. An example of the description for the task Invest in stock market is the following constraint: N 1* PP 1 +N 2* PP 2 +…+N m* PP m = totalProfit ∧ SP 1 *N 1 +SP 2* N 2 +…+SP m* N m ≤ investment + margin International Journal of Software Engineering and Its Applications International Journal of Software Engineering and Its ApplicationsInternational Journal of Software Engineering and Its Applications International Journal of Software Engineering and Its Applications Vol. Vol. Vol. Vol. 4 44 4, No. , No., No. , No. 4 44 4, , , , October OctoberOctober October 20 2020 2010 1010 10 83 ∧ SP 1 *N 1 +SP 2* N 2 +…+SP m* N m ≥ investment - margin ∧ N 1 ≤C 1 ∧ N 2 ≤C 3 ∧ ... ∧ N m ≤C m Where SP 1 , …, SP m represent the prices of each available stock (Stock Price), C 1 , …, C m, represent the available quantity for each stock, and PP 1 , …, PP m represent the Profit Percentages obtained for each stock. All the information is obtained for the web service. For an specific investment and a margin, a set of stocks will be bough, so many of each type as are represented with the variables N 1 , …, N m. Figure 1: Example of business process For Invest in stock market, both preconditions and postconditions can be described using constraints. Due to the interchange of information between the web services is carried out using a message protocol, the information sent will define what variables are known between the processes and which variables are private. For the example of “Invest in stock market”, there are two types of messages, one to receive the information and another to send the results. For the example, the variables are investment , margin and totalProfit , and the messages are: <message name=”StockInvestmentData”> <part name=”investment” type =”xsd:integer”/> <part name=”magin” type=”xsd:integer”/> </message> <message name=”StockInvestmentOutput”> <part name=”totalProfit” type=”xsd:integer”/> </message> 4. Storing web services specifications in databases When a system combines different web services in a business process to obtain a goal, it is useful that each phase of the process works with a set of data of different nature and stored in different databases. As it is analyzed in the previous section, the behavior of the web International Jou International JouInternational Jou International Journal of Software Engineering and Its Applications rnal of Software Engineering and Its Applicationsrnal of Software Engineering and Its Applications rnal of Software Engineering and Its Applications Vol. Vol. Vol. Vol. 4 44 4, No. , No., No. , No. 4 44 4, , , , October OctoberOctober October 20 2020 2010 1010 10 84 services can be mapped to constraints, thereby they can be stored in a natural way in a Constraint Database (CDB). Constraint Databases (CDB) were initially developed in 1990 with a paper by Kanellakis, Kuper and Revesz [11], and were extended through research on a query language [12][13] which is a subset of Prolog from the syntactical point of view (Datalog[23]) and through Constraint Logic Programming (CLP) [24][25]. These paradigms were used to define the first Constraint Databases, and created a new research area [26][27]. The basic idea behind the CDB model is to generalize the notion of a tuple in a relational database to a conjunction of constraints, since a tuple in relational algebra can be represented as an equality constraint between an attribute of the database and a constant value. CDBs permit represent a set of data by means of a constraint (formula) over a set of free variables x 1 , …, x m , at the same time that a set of classic attributes in the relational algebra a 1 , …, a n are used. An extension of classic CDBs based in these ideas is presented in [10]. The new definition of CDB proposed is based on: • A constraint k-tuple with the variables x 1 , …, x k , over the vocabulary - is a finite conjunction φ 1 ∧…∧φ N where each φ i , for 1≤ i ≤ N, is either a constraint such that {x j =Constant}, where x j ∈ { x 1 , …, x k }, called Classic Attribute, or an Ω- constraint over the variables x 1 , …, x k which do not correspond to a classic attribute, called constraint attribute. • A constraint relation is defined as a finite set of Classic Attributes and Constraint Attributes. A constraint relation of arity k, is a finite set r = {ψ 1 ,…ψ M }, where each ψ j for 1≤ j ≤ M is a constraint k-tuple over x 1 , …, x k . The corresponding formula is the disjunction ψ 1 ∨…∨ψ M , such that ψ j = φ 1 ∧…∧φ N for each φ i is a constraint k-tuple, where 1≤ i ≤ N. If in each ψ j ∈ r there is a φ i such that{x=Constant}, where x is the same variable in all φ i belonging to different ψ j , and x does not appear in the rest of the φ i of the same ψ j , then the x variable is a classic attribute, while the rest of the variables belong to constraint attributes. In Figure 2 the equivalence between a constraint relation and a constraint k-tuple is presented. • Therefore, a Constraint Database is a finite collection of constraint relations composed of Classic and Constraint Attributes. Figure 2: Representing constraint k-tuples and constraint relations The key idea is to store all the specifications and any another type of information (such as URI, SLA,…) of the web services in a CDB by means of their contract (precondition and Constraint Relation m ψ ψ ψ ∨ ∨ ∨ ... 2 1 nmmm n n ϕϕϕ ϕϕϕ ϕ ϕ ϕ ∧∧∧ ∨ ∨ ∧∧∧ ∨ ∧ ∧ ∧ ... ... ... ... 21 22212 12111 k-tuple constraint International Journal of Software Engineering and Its Applications International Journal of Software Engineering and Its ApplicationsInternational Journal of Software Engineering and Its Applications International Journal of Software Engineering and Its Applications Vol. Vol. Vol. Vol. 4 44 4, No. , No., No. , No. 4 44 4, , , , October OctoberOctober October 20 2020 2010 1010 10 85 postcondition). When a WS is detected as incorrect, a new WS with an equivalent or compatible specification will be selected to substitute it. Having all this information stored, the business process could be fault tolerance systems, since an incorrect WS can be substituted in an automatic way. The definition of CDB used in this paper permits to describe and store the behavior of web services as constraint attributes, and the public and private port of the web services as classic attributes. An example of representation of web services for Figure 1 is shown in Figure 3. In this example there are two classic attributes, the identification of the web services (IDWS) and the textual description of the service (Description). In the other hand, there are two constraint attributes to represent the pre and postconditions. In order to connect the different web services, the public variables are used. Since the behavior of the process is represented using constraints, it is possible to execute project operation over the constraints. The projection operation [28] permits to transform the precondition and postcondition depending on what of them are the public or private variables. It is also necessary to take into account that to connect two web services, they have to share some public variables. Figure 3: Example of tuples for Web Services In order to optimize the CDB queries, when a CDB is created, three auxiliary tables are also created (Constraints, Variables and Constraints/Variables) which relate each constraint with its variables. These tables, shown in Figure 3 and presented in [28], improve the computation time for obtaining the constraints related to the variables of a projection. These tables allow the identification of each constraint (Constraints table), each variable (Variables table) and the establishment of the relations between constraints and variables (Constraints/Variables table), thereby making it unnecessary to study all the constraints for a query. The table Constraints/Variables can also store the minimum and maximum value of each variable for every constraint. These tables are not accessible to the users, however these tables implicitly change according to the constraints added to or removed from the CDB. The table Constraints stores the idConstraint, which is the object identification (OID), generated by the system, and the Label according to the type of constraint, in order to decide which technique will be used to handle the constraint. The table Variables stores the names of the variables, their identification and their type. ≥ ≥ ≥ ≥ ≥ ≥ ∧ ∧ ∧ ∧ ∧ ≥ ≥ ≥ ≥ ≥ ≥ ≥ ∧ ∧ ∧ ∧ ∧ ≥ ≥ International Jou International JouInternational Jou International Journal of Software Engineering and Its Applications rnal of Software Engineering and Its Applicationsrnal of Software Engineering and Its Applications rnal of Software Engineering and Its Applications Vol. Vol. Vol. Vol. 4 44 4, No. , No., No. , No. 4 44 4, , , , October OctoberOctober October 20 2020 2010 1010 10 86 Figure 4. Database tables to index constraints and variables 5. Efficient search for substitute Web Services There are works [14][15] that are centered in web services queries. In this work we are centered in search new services in order to substitute one. In order to do that, it is important to bear in mind that the implementation M of a WS satisfies a contract C, if it satisfies the postcondition for a known precondition. Dijkstra’s weakest precondition calculus [29] (based on Hoare’s Logic) is based on: A formula A is weaker than a formula B if B ⇒ A Being WS A (Pre) and WS A (Post) the precondition and postcondition of the WS A belong to a business process. In order to obtain a WS B that can be the substitute to WS A, it is necessary that the specification of the WS B satisfies the following asserts: • WS b (Pre)  WS a (Pre). That means that all the possible input values for WS A are possible for WS B. • WS b (Post) ⊆ WS a (Post). That means that all the output values of WS B are equivalent or are included in WS A. Our proposal defines the implementation of this decision making by means of the construction of a Constraint Satisfaction Problem (CSP), in our concrete proposal we will use the selection operator of CDB. CSPs represent a reasoning framework consisting of variables, domains, and constraints. Formally, it is defined as a triple <X, D, C> where X = {x 1 , x 2 , …, x n } is a finite set of variables, D = {d(x 1 ), d(x 2 ), …, d(x n )} is a set of domains of the values of the variables, and C = {C 1 , C 2 , …, C m } is a set of constraints. Each constraint C i is defined as a relation R on a subset of variables V = {x i , x j+1 , …, x k }, called the constraint scope. The relation R may be represented as a subset of the Cartesian product d(x i ) × d(x j ) × … × d(xk). A constraint Ci = (X i , R i ) specifies the possible values of the variables in X i simultaneously in order to satisfy R. Let X i = {x i1 , x i2 , …, x il } be a subset of X. An l-tuple (x i1 , x i2 , …, x il ) from d(x i1 ), d(x i2 ), …, d ( x il ) is called an instantiation of the variables in X i . An instantiation of all the variables in X is a solution. In order to make the search more efficient, the implementation of CDB presented in [16] is used. This proposal achieves its efficiency in to avoid the construction of certain CSPs when it is possible. In order to do that, an analysis of the ranges the variables is carried on. The ranges of the variables are stored as it is explained in previous section. There are cases where the analysis of the range of variables avoids the construction of a CSP. Analyzing the maximum of minimum value of a variable, it is possible to infer if the constraints related in a comparison can satisfy a condition. For example, being Cx and Cy two constraints that define the precondition of two web services, both constraints defined over the variables v1 and v2, where the ranges for the variables for each constraint are Cx(v1:[1..15], v2[20..30]) and Cy(v1:[20..25], v2:[40..55]). In the example, the predicate Cx ⊆ Cy is false, and the web services represented by Cy cannot be a substitute of Cx. Using again the previous example, if the ranges of the variables would be Cx(v1:[5..15], v2[20..30]) and Cy(v1:[2..25], v2:[10..55]), an analysis of the range is not enough to know the evaluation of the predicate Cx ⊆ Cy. Although the International Journal of Software Engineering and Its Applications International Journal of Software Engineering and Its ApplicationsInternational Journal of Software Engineering and Its Applications International Journal of Software Engineering and Its Applications Vol. Vol. Vol. Vol. 4 44 4, No. , No., No. , No. 4 44 4, , , , October OctoberOctober October 20 2020 2010 1010 10 87 domain of the variables in Cx are included in the domain for the same variables in Cy, it is no possible ensure that Cx ⊆ Cy. An example is shown in Figure 5. Figure 5: Example where Cx ⊄ Cy For the range of all the shared public variables of the precondition and postcondition, there are different relations between them (shown in Figure 6). In function of each case, a CSP have to be created or not. The cases are: a. Cx ⊆ Cy is false b. Cx ⊆ Cy is false c. Cx ⊆ Cy is false d. Cx ⊆ Cy. It is necessary to create and solve a CSP to know the evaluation of the predicate e. Cx ⊆ Cy. It is necessary to create and solve a CSP to know the evaluation of the predicate Figure 6. Types of relations between ranges of variables The creation of the CSPs is based on to determine if all the solutions of Cx are also solutions of Cy. In order to analyze the inclusion operator in constraints, both constraints have to be defined over the same variables, then being Cx and Cy two constraints where X = {x 1 ,x 2 , …, x n } are the variables of Cx and Cy, Cx ⊆ Cy is equal than the implication (Cx → Cy) [17]. This comparison determines if all the solutions of Cx are