Abstract:
A method for converting a web service composition logic and an application server includes: obtaining a first BPEL process framework of an existing BPEL composition logic; generating a DAG composition logic according to the first BPEL process framework; obtaining an independent path group according to the DAG composition logic; analyzing an independent path grouping result to generate a second BPEL process framework; and filling a process of the second BPEL process framework to generate an executable process. An application server is provided to convert the web service composition logic. The method and the application server provided herein optimize the logic through parallelism or nesting of web service invocation, and improve the execution efficiency.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application is a continuation of International Application No. PCT/CN2009/070377, filed on Feb. 6, 2009, which claims priority to Chinese Patent Application No. 200810065727.2, filed on Feb. 27, 2008, both of which are hereby incorporated by reference in their entireties. 
     
    
     FIELD OF THE DISCLOSURE 
       [0002]    The present disclosure relates to web services, and in particular, to a method and an application server for converting a web service composition logic. 
       BACKGROUND 
       [0003]    Web Service (WS) composition is divided into three types: manual composition, semi-automatic composition, and automatic composition. Manual composition is to generate a web service execution process manually through a graph or text edit interface, and submit it to the process execution engine. Some service-composition systems provide graphic user interfaces. A user uses a User Interface (UI) to construct an execution process through proper web services of Universal Description Discovery and Integration (UDDI). Some service composition systems use a service container to aggregate the web services of the same function in the UDDI, and use a scoring mechanism to select the proper services during operation. In such systems: When the services in the UDDI accumulate to a certain quantity, it is very difficult to discover or select services, and manual selection increases the workload of the user. 
         [0004]    The semi-automatic composition provides semantic proposal about selection of web services in the composition of the user. However, the user still needs to select the web services to be composed from the filtered service list, and connect the selected web services. Although such systems solve some manual composition problems, the user still needs to make manual selection among many services. 
         [0005]    Automatic composition solves the foregoing problem well, and generally uses the technologies such as artificial intelligence to select services automatically and generate a service process automatically. 
         [0006]    Business Process Execution Language (BPEL) is an executable language for business processes of web services. The BPEL does not execute any detail in the business process, and does not involve storage or processing of business data. The BPEL only controls the invocation of sub-services and controls the process. 
         [0007]    The BPEL may be expressed in the following structure: 
         [0000]    
       
         
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 &lt;process name=“UserProcess”&gt; 
               
               
                   
                 &lt;partners&gt; ....&lt;/partners&gt; 
               
               
                   
                 &lt;variables&gt; .... &lt;/variables&gt; 
               
               
                   
                 &lt;correlationSets&gt; .... &lt;/correlationSets&gt; 
               
               
                   
                 &lt;faultHandlers&gt; .... &lt;/faultHandlers&gt; 
               
               
                   
                 &lt;compensationHandler&gt; .... &lt;/compensationHandler&gt; 
               
               
                   
                 &lt;eventHandlers&gt; .... &lt;/eventHandlers&gt; 
               
               
                   
                 &lt;sequence&gt; .... &lt;/sequence&gt; 
               
               
                   
                 &lt;/process&gt; 
               
               
                   
                   
               
             
          
         
       
     
         [0008]    Each process begins with &lt;process&gt;, and defines a process name and a name space. &lt;partners&gt; defines the external web services invoked by the process. &lt;variables&gt; defines the data used in the process. Such data is the input and output based on web services. The primary tag is &lt;sequence&gt;, which defines the execution structure of the process. In this segment, Structured Activities and Primitive Activities may be defined. Primitive activities may be nested in structured activities. Structured activities include: &lt;sequence&gt; (sequential execution), &lt;switch&gt; (branch), &lt;pick&gt; (selectively executing according to conditions), &lt;flow&gt; (parallel execution), and &lt;while&gt; (cycle). Primitive activities include: &lt;invoke&gt; (invoking external web services), &lt;receive&gt; (receiving user input), &lt;reply&gt; (returning the output of the &lt;receive&gt; activities to the user), &lt;assign&gt; (assigning a value to input and output between two processes), &lt;throw&gt; (throwing exception), &lt;terminate&gt; (forcing the business process instance to stop), &lt;wait&gt; (delaying the execution for a fixed time period), &lt;empty&gt; (staying idle), &lt;compensate&gt; (designating a compensation Handler for a scope). 
         [0009]    With respect to converting the composition logic into the BPEL composition logic, the prior art converts the finally generated process description into the BPEL mode, but the finally generated process logic executes every sub-service sequentially, without parallel execution &lt;flow&gt; or branch execution &lt;switch&gt;. 
         [0010]    A Web services TO BPEL (WTOP) algorithm is put forward, namely, the web service composition logic is converted to BPEL automatically. The conception of the WTOP is to divide the composition logic hierarchically, and traverse layer by layer until all nodes are executed. The method is as follows: Find all the nodes whose in-degree is 0 in the current graph; if there is only one such node, output the node directly and delete the node and its relevant edges; if there is more than one node whose in-degree is 0, output all such nodes concurrently through a flow tag, and delete the nodes and relevant edges. This algorithm implements automatic conversion from a Directed Acyclic Graph (DAG) mode to a BPEL mode, and uses a parallel process. However, this algorithm does not support nesting of a parallel process. 
         [0011]      FIG. 1  shows a process of the WTOP algorithm. 
         [0012]    This algorithm searches for the nodes whose in-degree is 0, and traverse hierarchically. The output of the algorithm is shown in  FIG. 2 . 
         [0013]    At the beginning, ws 1  is the only node whose in-degree is 0, and is output directly, and then this node and the edges related to it are deleted. Afterward, the search is performed again, and ws 2  and ws 3  are found as the nodes whose in-degree is 0. In this case, the flow tag is output, and ws 2  and ws 3  are output as child nodes of the flow tag. The operation is repeated until all nodes are finished. 
         [0014]    The result of the WTOP algorithm is shown in  FIG. 2(   a ). In fact, the output of this DAG ought to be shown in  FIG. 2(   b ), namely, nodes ws 3 , ws 4 , ws 5 , and ws 6  are executed concurrently with ws 2 , and nodes ws 4  and ws 5  are Nested parallel sub-processes inside the processes of ws 3 , ws 4  ws 5 , ws 6  processes. According to the instance, the problems brought by non-support of nesting are evident. 
         [0015]    It is assumed that the execution time of ws 2  is 1000 s, the execution time of any of nodes ws 3 , ws 4 , ws 5 , and ws 6  is 300 s, the execution time of ws 1  is 100 s, and the execution time of ws 7  is 100 s. The execution time of the parallel process is calculated according to the sub-path whose execution time is the greatest. Therefore, the execution time of synthesizing services is calculated according to the WTOP algorithm in  FIG. 2(   a ), and calculation result is t 1 +Max(t 2 , t 3 )+Max(t 4 , t 5 )+t 6 +t 7 =100+1000+300+300+100=1800 s. If the calculation is based on  FIG. 2(   b ), the calculation result is t 1 +Max(t 2 , (t 3 +Max(t 4 , t 5 )+t 6 ))+t 7 =100+1000+100=1200 s. This reveals the impact on the execution time caused by non-support of the nested parallel process in the WTOP algorithm. 
         [0016]    In the prior art, the composition logic expressed in the BPEL mode keeps unchanged once it is specified, and the BPEL engine invokes the web service sequentially. In this case, it is impossible to optimize the invocation proactively according to the actual several web services suitable for parallel or nested invocation. 
       SUMMARY 
       [0017]    The embodiments of the present disclosure provide a method and an application server for converting the web service composition logic. 
         [0018]    As a first aspect of the disclosure, the method for converting a web service composition logic includes: 
         [0019]    obtaining a first process of the composition logic of the web service; 
         [0020]    generating a framework process according to the first process of the composition logic of the web service; and 
         [0021]    generating the second process of the composition logic of the web service according to the framework process. 
         [0022]    As a second aspect of the disclosure, the method for converting a BPEL composition logic of web services includes: 
         [0023]    obtaining the process of the BPEL composition logic of web services; and 
         [0024]    generating a framework process according to the process of the BPEL composition logic of web services. 
         [0025]    As a third aspect of the disclosure, the method for converting a DAG composition logic of web services includes: 
         [0026]    obtaining independent path groups according to the DAG composition logic; 
         [0027]    analyzing and processing the independent path groups to generate a second framework process of the composition logic of the web service; and 
         [0028]    filling the second framework process of the composition logic of the web service to generate the second process of the composition logic of the web service. 
         [0029]    In an implementation form thereof, the application server includes a central processor, and the application server further includes: 
         [0030]    a process retrieving unit, adapted to retrieve the first process of the composition logic of the web service from the existing web service composition logic; 
         [0031]    a process processing unit, adapted to generate a framework process according to the first process of the composition logic of the web service obtained by the process retrieving unit; and 
         [0032]    a process generating unit, adapted to perform operations according to the framework process generated by the process processing unit, and generate the second process of the composition logic of the web service. 
         [0033]    In an implementation form thereof, the application server includes a central processor, and further includes: 
         [0034]    a process retrieving unit, adapted to retrieve the process of the composition logic of the existing web service; and 
         [0035]    a process processing unit, adapted to generate a framework process according to the process of the composition logic of the web service. 
         [0036]    In an implementation form thereof, the application server includes a central processor, and further includes: 
         [0037]    a path grouping unit, adapted to group the paths according to a DAG framework process; 
         [0038]    a process generating unit, adapted to analyze the DAG framework process to generate a framework process of the composition logic of the web service; and 
         [0039]    a process filling unit, adapted to fill the framework process of the composition logic of the web service to generate the process of the composition logic of the web service. 
         [0040]    Compared with the conventional technologies, the embodiments of the present disclosure bring at least the following benefits: 
         [0041]    The logic execution can be optimized according to parallelism or nesting of web service invocation after the DAG logic is generated and mapped on the basis of the existing process of the composition logic expressed in the BPEL mode, thus improving the execution efficiency and accomplishing conversion from a complex composition logic to a BPEL composition logic. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0042]      FIG. 1  is a flow chart of a WTOP algorithm; 
           [0043]      FIG. 2   a  is an output result in the scenario that the WTOP algorithm does not support nested parallelism; 
           [0044]      FIG. 2   b  is an output result in the scenario that the WTOP algorithm supports nested parallelism; 
           [0045]      FIG. 3  is a graphical representation of a DAG composition logic; 
           [0046]      FIG. 4  is a flow chart of the first embodiment of the present disclosure; 
           [0047]      FIG. 5  is a flow chart of the second embodiment of the present disclosure; 
           [0048]      FIG. 6  is a flow chart of the third embodiment of the present disclosure; 
           [0049]      FIG. 7  is a graphical schematic diagram of conversion from a BPEL composition logic to a DAG composition logic according to the third embodiment of the present disclosure; 
           [0050]      FIG. 8  is a schematic diagram of an independent path group according to the third embodiment of the present disclosure; 
           [0051]      FIG. 9  is a system schematic structure diagram of the fourth embodiment of the present disclosure; 
           [0052]      FIG. 10  is a system schematic structure diagram of the fifth embodiment of the present disclosure; and 
           [0053]      FIG. 11  is a system schematic structure diagram of the sixth embodiment of the present disclosure. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0054]    In order to make the technical solution, objectives and merits of the present disclosure clearer, the present disclosure is hereinafter described in detail by reference to accompanying drawings and exemplary embodiments. 
       Embodiment 1 
       [0055]    This embodiment is about conversion from the process of the BPEL composition logic to the process of the Directed Acyclic Graph (DAG) composition logic, as shown in  FIG. 4 . 
         [0056]    Step  41 : Obtain the process of the BPEL composition logic from the composition logic repository. 
         [0057]    Step  42 : Generate a BPEL framework process according to the obtained process of the BPEL composition logic. 
         [0058]    Retrieve the process-related information from the BPEL script in a certain mode, for example, eXtensible Markup Language (XML) parser, Xpath query method, or in other modes well known to those skilled in the art. The process-related information includes the Sequence operation, Flow operation, and the source (from) and destination (to) attributes in assign operation. Such information is combined into a BPEL framework process. At the same time, obtain the non-process information (variable definition, role definition, and so on) other than the information required by the framework process. 
         [0059]    For example, a BPEL framework process is as follows: 
         [0000]    
       
         
               
             
               
               
             
               
               
             
               
               
             
               
             
           
               
                   
               
             
             
               
                 &lt;process xmlns=“http://schemas.xmlsoap.org/ws/2003/03/business-process/”&gt; 
               
               
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“userRequest” part=“ws1in”/&gt; 
               
               
                   
                 &lt;to variable=“ws1in”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                 &lt;/sequence&gt; 
               
               
                 &lt;/process&gt; 
               
               
                   
               
             
          
         
       
     
         [0060]    Step  43 : Process the BPEL framework process to obtain the process of the DAG composition logic. 
         [0061]    The DAG composition logic describes the multiple web services and the relations between them according to a general descriptive mode. A converted DAG composition logic may be represented in several modes, generally including graphical representation and datasheet representation. 
         [0062]    The graphical representation of a composition logic is shown in  FIG. 3 . The composition logic obtained by the web service composition engine is represented in the DAG mode. Each node denotes operations of a web service. An edge denotes the output of the previous web service and the input of the next web service and depicts the execution dependency and data dependency between web services. 
         [0063]    The DAG composition logic is expressed in a datasheet in the following mode: 
         [0064]    Each operation of a web service is defined as a DAG node. If a web service includes multiple operations, the multiple operations of the web service are defined as different nodes, namely, treat the web service as multiple web services, each of which has only one operation. 
         [0065]    Define the output of the previous web service and the input of next web service as an edge of a DAG-related node, and mark the predecessor node set (namely, execution dependence) and data dependence of the node. 
         [0066]    Table 1 is a datasheet representation of the DAG composition logic represented graphically in  FIG. 3 : 
         [0000]    
       
         
               
             
               
               
               
               
             
           
               
                 TABLE 1 
               
             
             
               
                   
               
               
                 Composition logic represented in a datasheet 
               
             
          
           
               
                 Serial No. 
                 Node 
                 Predecessor Node Set 
                 Data Dependence 
               
               
                   
               
               
                 1 
                 ws1 
                 Pred&lt;NULL&gt; 
                 Relay&lt;NULL&gt; 
               
               
                 2 
                 ws2 
                 Pred &lt;ws1&gt; 
                 Relay &lt;e1&gt; 
               
               
                 3 
                 ws3 
                 Pred &lt;ws1&gt; 
                 Relay &lt;e2&gt; 
               
               
                 4 
                 ws4 
                 Pred &lt;ws2, ws3&gt; 
                 Relay &lt;e3, e4&gt; 
               
               
                 5 
                 ws5 
                 Pred &lt;ws3&gt; 
                 Relay &lt;e5&gt; 
               
               
                 6 
                 ws6 
                 Pred &lt;ws4, ws5&gt; 
                 Relay &lt;e6, e7&gt; 
               
               
                   
               
             
          
         
       
     
         [0067]    Concept 1: A web service composition logic is a DAG graph G=(V, E), and the composition logic G can be uniquely identified by, the vectors V and E, where: 
         [0068]    Node V={an operation wsi in the web services}; 
         [0069]    the edge E is a subset of the ordered product V×V, E={e i,j |e i,j =ws i →ws j }, where e i,j  is a directional edge pointed from node ws i  to ws j , and indicates relevance between ws i  and ws j . 
         [0070]    As shown in  FIG. 1 , e 3,5 =ws 3 →ws 5 , and edge e 3,5  indicates that the output of ws 3  is the input of ws 5 . 
         [0071]    Concept 2: Predecessor node set of the node: pred(ws i )={ws j |e j,i εE} 
         [0072]    In  FIG. 1 , the predecessor nodes of ws 6  are {ws 4 , ws 5 }. 
         [0073]    Concept 3: Execution dependence: ws i  is executable only after pred(ws i ) finishes executing, namely, a node need to wait for all predecessor nodes to finish executing so as to be executable. 
         [0074]    Concept 4: Data dependence: If an edge e i,j  exists between ws i  and ws j , data dependence exists between ws i  and ws j . It indicates that an output of ws i  flows into an input of ws j . The detailed processing may be as follows: 
         [0075]    judge the source (from) attribute and the destination (to) attribute of each &lt;assign&gt; element in the BPEL framework process; 
         [0076]    for the “from” attribute, if “from” is input by the user, mark the “from” as NULL; if “from” is not input by the user and is not in the DAG description, add the “from” attribute into the DAG description, and record the “parent” of “from” as NULL; if “from” is in the DAG description, go on to judge the “to” attribute; 
         [0077]    for the “to” attribute, if “to” is not in the DAG description, add the “to” attribute into the DAG description, and add the “from” attribute into its “parent” attribute; if the “to” attribute is in the DAG description, add the “from” attribute into its “parent” attribute. 
         [0078]    Repeat the foregoing process to judge other “from” attributes and “to” attributes. As a result, the DAG description includes the nodes corresponding to all web services, and the whole DAG description is constructed through the parent relation. 
         [0079]    According to the whole DAG description, the process of the DAG composition logic may be generated. 
       Embodiment 2 
       [0080]    This embodiment is about conversion from a BPEL composition logic to a DAG composition logic, as shown in  FIG. 5 . 
         [0081]    First, obtain the DAG composition logic, which may be obtained from the composition logic storing unit. 
         [0082]    Step  50 : Verify the obtained DAG composition logic. If the verification succeeds, perform step  51 . This step is optional. 
         [0083]    The detailed verification method is as follows: 
         [0084]    verify whether the composition logic representation is a connected graph: If more than one independent node or node set exist, the verification fails; 
         [0085]    check for loops: If the composition logic includes any loop, the verification fails; 
         [0086]    check for any node whose in-degree is 0: If the in-degree of no node is 0, it indicates that the DAG is incomplete, and the composition logic verification fails; and 
         [0087]    check for any node whose out-degree is 0: If the out-degree of no node is 0, it indicates that the DAG is incomplete, and the composition logic verification fails. 
         [0088]    Step  51 : The paths of the DAG composition logic verified successfully are grouped. 
         [0089]    Several concepts need to be clarified first: 
         [0090]    Concept 5: Path dependence: If a node in path A exists in path B, path A is dependent on path B. Path independence: If no node in path A exists in path B, path A is independent of path B. 
         [0091]    For example, in  FIG. 1 , path { 2 } is independent of path { 3 - 4 - 6 }; path { 3 - 4 - 6 } is dependent on path { 3 - 5 - 6 }. 
         [0092]    Concept 6: Independent path group: All dependent paths in a path set constitute an independent path group. 
         [0093]    For example, in  FIG. 1 , path { 3 - 4 - 6 } is dependent on path { 3 - 5 - 6 }, and the two paths constitute an independent path group {{ 3 - 4 - 6 }, { 3 - 5 - 6 }}. 
         [0094]    Concept 7: If a path Pε path group G, and node N is on the path P, then N is a node in path group G. That is, if NεP and PεG, then NεV(G), where V(G) is a set of the nodes on all paths in path group G. 
         [0095]    Theorem 1: No dependence exists between independent path groups. 
         [0096]    Proof: Supposing that A and B are in different independent path groups and A is dependent on B, then there are P 1 εA and P 2 εB, where path P 1  is dependent on path P 2 . According to the concept of an independent path group, dependent paths constitute a group, and therefore, P 1  and P 2  are in the same independent path group, and then A and B are in the same independent path group. That contradicts the assumption that A and B are in different independent path groups. 
         [0097]    The path grouping method includes: The depth-first-traversal method is applied to the DAG composition logic to obtain all path groups from the head node to the end node. Those skilled in the art are aware that other methods may be applied in place of the depth-first traversal method to obtain all path groups from the head node to the end node. 
         [0098]    Step  52 : Combine all dependent path groups, and put all dependent paths into an independent path group until no more path group can be combined. Output the finally obtained independent path groups. 
         [0099]    Step  53 : Analyze the independent path groups to generate a BPEL framework process, for example, through the following steps: 
         [0100]    Step  531 : Judge the grouping result of the combined independent path groups. 
         [0101]    If the grouping result is only one independent path group, perform  532 ; if there are more than one independent path group, perform step  533  and step  534 . 
         [0102]    Step  532 : Judge the scenario of the independent path group (there are four modes in total), perform operations according to the corresponding scenario, and output the corresponding sequence information and nodes. 
         [0103]    The processing method falls into four scenarios: 
         [0104]    (a) If all paths have the same head node and the same end node, output the same head node and the same end node first, and delete the same head node and the same end node in all paths. Perform recursion for the remaining sub-paths and perform step  531  in the process generating method. 
         [0105]    (b) If all paths have the same head node but different end nodes, output the same head node first, and delete the same head node in all paths. Perform recursion for the remaining sub-paths and perform step  531  in the process generating method. 
         [0106]    (c) If all paths have the same end node but different head nodes, output the same end node first and delete it. Perform recursion for the remaining paths and perform step  531  in the process generating method. 
         [0107]    (d) If neither the head node nor the end node is the same, group the nodes hierarchically in light of the WTOP algorithm because neither the parallel process nor the sequential process is applicable to conversion in this circumstance. Afterwards, retrieve all head nodes whose in-degree is 0, and output such head nodes to the flow tag description concurrently, indicating concurrent execution of all the services represented by the nodes whose in-degree is 0. Perform recursion for the sub-path set without head nodes, and perform step  531  in the process generating method. 
         [0108]    Table 2 shows the results of executing the algorithm in the four scenarios: 
         [0000]    
       
         
               
             
               
               
               
               
               
               
             
           
               
                 TABLE 2 
               
             
             
               
                   
               
               
                 Execution results of four modes 
               
             
          
           
               
                   
                   
                 (a) 
                 (b) 
                 (c) 
                 (d) 
               
               
                   
                   
               
               
                   
                 Path in the 
                 1-2-4 
                 1-2-4 
                 1-2-4 
                 2-4-8 
               
               
                   
                 independent 
                 1-3-4 
                 1-2-5 
                 3-4 
                 2-5-8 
               
               
                   
                 path group 
                   
                 1-3-5 
                   
                 3-5-8 
               
               
                   
                   
                   
                   
                   
                 3-6-7 
               
               
                   
                 Execution result 
                 &lt;1&gt; 
                 &lt;1&gt; 
                 &lt;recur&gt; 
                 &lt;flow&gt; 
               
               
                   
                   
                 &lt;recur&gt; 
                 &lt;recur&gt; 
                 &lt;4&gt; 
                 &lt;2&gt; 
               
               
                   
                   
                 &lt;4&gt; 
                   
                   
                 &lt;3&gt; 
               
               
                   
                   
                   
                   
                   
                 &lt;/flow&gt; 
               
               
                   
                   
                   
                   
                   
                 &lt;recur&gt; 
               
               
                   
                   
               
             
          
         
       
     
         [0109]    Step  533  and step  534 : If multiple independent path groups exist, output the parallel information for each independent path group, perform recursion, callback and perform  531  for each independent path group. 
         [0110]    Step  535 : Collate the finally categorized output results (including the sequence information), and output a BPEL framework process. 
         [0111]    Step  54 : Fill the process. 
         [0112]    A BPEL framework process is generated in the process generating stage, and includes the information such as &lt;flow&gt; and &lt;sequence&gt;, and other information needs to be added in order to generate an execute process, including: variable definition, participant definition, and operations. 
         [0113]    For example, a BPEL framework process is as follows: 
         [0000]    
       
         
               
             
               
               
             
               
               
             
               
               
             
               
             
           
               
                   
               
             
             
               
                 &lt;process xmlns=“http://schemas.xmlsoap.org/ws/2003/03/business-process/”&gt; 
               
               
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“userRequest” part=“ws1in”/&gt; 
               
               
                   
                 &lt;to variable=“ws1in”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                 &lt;/sequence&gt; 
               
               
                 &lt;/process&gt; 
               
               
                   
               
             
          
         
       
     
         [0114]    After the corresponding variables are filled, the generated script is as follows: 
         [0000]    
       
         
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
             
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 &lt;process xmlns=“http://schemas.xmlsoap.org/ws/2003/03/business-process/”&gt; 
               
               
                   
                 &lt;variables&gt; 
               
             
          
           
               
                   
                 &lt;variable name=“userRequest” messageType=“tns:userRequest”/&gt; 
               
               
                   
                 &lt;variable name=“userResponse” messageType=“tns:userResponse”/&gt; 
               
             
          
           
               
                   
                 &lt;variables&gt; 
               
               
                   
                 &lt;partners&gt; 
               
             
          
           
               
                   
                 &lt;partner name=“User” serviceLinkType=“tns:UserSLT” myRole=“UserProvider”/&gt; 
               
               
                   
                 &lt;partner name=“ws1” serviceLinkType=“ws1LT” partnerRole=“ws1PR”/&gt; 
               
             
          
           
               
                   
                 &lt;/partners&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“userRequest” part=“ws1in”/&gt; 
               
               
                   
                 &lt;to variable=“ws1in”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
               
                   
                 &lt;invoke name=“1” partner=“ws1” portType=“ws1PT” operation=“ws1OP” 
               
             
          
           
               
                 inputVariable=“ws1in” outputVariable=“ws1out”/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;/process&gt; 
               
               
                   
                   
               
             
          
         
       
     
       Embodiment 3 
       [0115]    As shown in  FIG. 6 , this embodiment describes how to optimize an executable BPEL composition logic with respect to parallelism and nesting of multiple web services through generating and mapping of a DAG logic. 
         [0116]    This embodiment descries the execution of this system, taking an executable BPEL composition logic as an example. 
         [0117]    The BPEL composition logic is expressed as follows: 
         [0000]    
       
         
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
               
               
               
             
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
               
               
               
             
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
               
               
               
             
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
               
               
               
             
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
               
               
               
             
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
               
               
               
             
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
               
               
               
             
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
               
               
               
             
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
               
               
               
             
               
             
               
               
             
               
             
           
               
                   
                   
               
             
             
               
                   
                 &lt;?xml version=“1.0” encoding=“UTF-8”?&gt; 
               
               
                   
                 &lt;process xmlns=“http://schemas.xmlsoap.org/ws/2003/03/business-process/”&gt; 
               
               
                   
                 &lt;variables&gt; 
               
             
          
           
               
                   
                 &lt;variable name=“userRequest” messageType=“tns:userRequest”/&gt; 
               
               
                   
                 &lt;variable name=“userResponse” messageType=“tns:userResponse”/&gt; 
               
               
                   
                 &lt;variable name=“ws1in” messageType=“ws1intype”/&gt; 
               
               
                   
                 &lt;variable name=“ws2in” messageType=“ws2intype”/&gt; 
               
               
                   
                 &lt;variable name=“ws3in” messageType=“ws3intype”/&gt; 
               
               
                   
                 &lt;variable name=“ws4in” messageType=“ws4intype”/&gt; 
               
               
                   
                 &lt;variable name=“ws5in” messageType=“ws5intype”/&gt; 
               
               
                   
                 &lt;variable name=“ws6in” messageType=“ws6intype”/&gt; 
               
               
                   
                 &lt;variable name=“ws7in1” messageType=“ws7in1type”/&gt; 
               
               
                   
                 &lt;variable name=“ws7in2” messageType=“ws7in2type”/&gt; 
               
               
                   
                 &lt;variable name=“ws8in1” messageType=“ws8in1type”7&gt; 
               
               
                   
                 &lt;variable name=“ws8in2” messageType=“ws8in2type”/&gt; 
               
               
                   
                 &lt;variable name=“ws1out” messageType=“ws1outtype”/&gt; 
               
               
                   
                 &lt;variable name=“ws2out” messageType=“ws2outtype”/&gt; 
               
               
                   
                 &lt;variable name=“ws3out” messageType=“ws3outtype”/&gt; 
               
               
                   
                 &lt;variable name=“ws4out” messageType=“ws4outtype”/&gt; 
               
               
                   
                 &lt;variable name=“ws5out” messageType=“ws5outtype”/&gt; 
               
               
                   
                 &lt;variable name=“ws6out” messageType=“ws6outtype”/&gt; 
               
               
                   
                 &lt;variable name=“ws7out” messageType=“ws7outtype”/&gt; 
               
               
                   
                 &lt;variable name=“ws8out” messageType=“ws8outtype”/&gt; 
               
             
          
           
               
                   
                 &lt;/variables&gt; 
               
               
                   
                 &lt;partners&gt; 
               
             
          
           
               
                   
                 &lt;partner name=“User” serviceLinkType=“tns:UserSLT” myRole=“UserProvider”/&gt; 
               
               
                   
                 &lt;partner name=“ws1” serviceLinkType=“ws1LT” partnerRole=“ws1PR”/&gt; 
               
               
                   
                 &lt;partner name=“ws2” serviceLinkType=“ws2LT” partnerRole=“ws2PR”/&gt; 
               
               
                   
                 &lt;partner name=“ws3” serviceLinkType=“ws3LT” partnerRole=“ws3PR”/&gt; 
               
               
                   
                 &lt;partner name=“ws4” serviceLinkType=“ws4LT” partnerRole=“ws4PR”/&gt; 
               
               
                   
                 &lt;partner name=“ws5” serviceLinkType=“ws5LT” partnerRole=“ws5PR”/&gt; 
               
               
                   
                 &lt;partner name=“ws6” serviceLinkType=“ws6LT” partnerRole=“ws6PR”/&gt; 
               
               
                   
                 &lt;partner name=“ws7” serviceLinkType=“ws7LT” partnerRole=“ws7PR”/&gt; 
               
               
                   
                 &lt;partner name=“ws8” serviceLinkType=“ws8LT” partnerRole=“ws8PR”/&gt; 
               
             
          
           
               
                   
                 &lt;/partners&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“userRequest” part=“ws1in”/&gt; 
               
               
                   
                 &lt;to variable=“ws1in”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;invoke 
                 name=“1” 
                 partner=“ws1” 
                 portType=“ws1PT” 
                 operation=“ws1OP” 
               
             
          
           
               
                 inputVariable=“ws1in” output Variable=“ws1out”/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws1out” part=“ws1out”/&gt; 
               
               
                   
                 &lt;to variable=“ws2in”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;invoke 
                 name=“2” 
                 partner=“ws2” 
                 portType=“ws2PT” 
                 operation=“ws2OP” 
               
             
          
           
               
                 inputVariable=“ws2in” outputVariable=“ws2out”/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws2out” part=“ws2out”/&gt; 
               
               
                   
                 &lt;to variable=“ws3in”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;invoke 
                 name=“3” 
                 partner=“ws3” 
                 portType=“ws3PT” 
                 operation=“ws3OP” 
               
             
          
           
               
                 input Variable=“ws3in” outputVariable=“ws3out”/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws1out” part=“ws1out”/&gt; 
               
               
                   
                 &lt;to variable=“ws4in”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;invoke 
                 name=“4” 
                 partner=“ws4” 
                 portType=“ws4PT” 
                 operation=“ws4OP” 
               
             
          
           
               
                 inputVariable=“ws4in” outputVariable=“ws4out”/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws4out” part=“ws4out”/&gt; 
               
               
                   
                 &lt;to variable=“ws5in”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;invoke 
                 name=“5” 
                 partner=“ws5” 
                 portType=“ws5PT” 
                 operation=“ws5OP” 
               
             
          
           
               
                 input Variable=“ws5in” outputVariable=“ws5out”/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws4out” part=“ws4out”/&gt; 
               
               
                   
                 &lt;to variable=“ws6in”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;invoke 
                 name=“6” 
                 partner=“ws6” 
                 portType=“ws6PT” 
                 operation=“ws6OP” 
               
             
          
           
               
                 inputVariable=“ws6in” outputVariable=“ws6out”/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws5out” part=“ws5out”/&gt; 
               
               
                   
                 &lt;to variable=“ws7in1”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws6out” part=“ws6out”/&gt; 
               
               
                   
                 &lt;to variable=“ws7in2”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;invoke 
                 name=“7” 
                 partner=“ws7” 
                 portType=“ws7PT” 
                 operation=“ws7OP” 
               
             
          
           
               
                 inputVariable=“ws7in1 ws7in2” outputVariable=“ws7out”/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws3out” part=“ws3out”/&gt; 
               
               
                   
                 &lt;to variable=“ws8in1”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws7out” part=“ws7out”/&gt; 
               
               
                   
                 &lt;to variable=“ws8in2”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;invoke 
                 name=“8” 
                 partner=“ws8” 
                 portType=“ws8PT” 
                 operation=“ws8OP” 
               
             
          
           
               
                 inputVariable=“ws8in1 ws8in2” outputVariable=“ws8out”/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;copy&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws8out” part=“ws8out”/&gt; 
               
               
                   
                 &lt;to variable=“userResponse” part=“ws8out”/&gt; 
               
             
          
           
               
                   
                 &lt;/copy&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;reply 
                  name=“reply” 
                 partner=“User” 
                 portType=“tns:machine-xxPT” 
               
             
          
           
               
                 operation=“mxx” variable=“userResponse”/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
             
          
           
               
                   &lt;/process&gt; 
               
               
                   
               
             
          
         
       
     
         [0118]    Step  60 : Retrieve the process. 
         [0119]    The BPEL file is obtained, for example, from the composition logic storing unit in this embodiment. All &lt;assign&gt; elements are obtained through an XML parser. The process-related elements (sequence, flow) are retained. Here other process-unrelated information may also be retrieved. After the retrieving, the whole output of the BPEL framework process is: 
         [0000]    
       
         
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 &lt;process&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“userRequest” part=“ws1in”/&gt; 
               
               
                   
                 &lt;to variable=“ws1in”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws1out” part=“ws1out”/&gt; 
               
               
                   
                 &lt;to variable=“ws2in”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws2out” part=“ws2out”/&gt; 
               
               
                   
                 &lt;to variable=“ws3in”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws1out” part=“ws1out”/&gt; 
               
               
                   
                 &lt;to variable=“ws4in”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws4out” part=“ws4out”/&gt; 
               
               
                   
                 &lt;to variable=“ws5in”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws4out” part=“ws4out”/&gt; 
               
               
                   
                 &lt;to variable=“ws6in”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws5out” part=“ws5out”/&gt; 
               
               
                   
                 &lt;to variable=“ws7in1”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws6out” part=“ws6out”/&gt; 
               
               
                   
                 &lt;to variable=“ws7in2”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws3out” part=“ws3out”/&gt; 
               
               
                   
                 &lt;to variable=“ws8in1”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws7out” part=“ws7out”/&gt; 
               
               
                   
                 &lt;to variable=“ws8in2”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;assign&gt; 
               
             
          
           
               
                   
                 &lt;from variable=“ws8out” part=“ws8out”/&gt; 
               
               
                   
                 &lt;to variable=“userResponse” part=“ws8out”/&gt; 
               
             
          
           
               
                   
                 &lt;/assign&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;/process&gt; 
               
               
                   
                   
               
             
          
         
       
     
         [0120]    Step  61 : Handle the process. 
         [0121]    A general method for handling the process is: 
         [0122]    judge the “from” attribute and the “to”&gt; attribute of each &lt;assign&gt; element in the BPEL framework process; 
         [0123]    as for the “from” attribute, if “from” is input by the user, mark the “from” as NULL; if “from” is not input by the user and is not in the DAG description, add the “from” attribute into the DAG description, and record the “parent” of “from” as NULL; if “from” is in the DAG description, go on to judge the “to” attribute; 
         [0124]    as for the “to” attribute, if “to” is not in the DAG description, add the “to” attribute into the DAG description, and add the “from” attribute into its “parent” attribute; if the “to” attribute is in the DAG description, add the “from” attribute into its “parent” attribute; and 
         [0125]    repeat judging other “from” attributes and “to” attributes. As a result, the DAG description includes all the nodes corresponding to the web service, and the whole DAG description is constructed through the parent relation. 
         [0126]    According to generated DAG description, a DAG composition logic may be generated. 
         [0127]      FIG. 7  shows a graphic representation of the DAG composition logic obtained after the process is handled in this embodiment. 
         [0128]    Table 4 shows the generated result, taking the datasheet as an example. 
         [0000]    
       
         
               
             
               
               
               
               
             
           
               
                 TABLE 4 
               
             
             
               
                   
               
               
                 Composition logic expressed in a datasheet 
               
             
          
           
               
                 Serial 
                   
                   
                   
               
               
                 No. 
                 Node 
                 Predecessor node set 
                 Data dependence 
               
               
                   
               
               
                 1 
                 ws1 
                 Pred&lt;NULL&gt; 
                 Relay&lt;NULL&gt; 
               
               
                 2 
                 ws2 
                 Pred &lt;ws1&gt; 
                 Relay &lt;e12&gt; 
               
               
                 3 
                 ws3 
                 Pred &lt;ws2&gt; 
                 Relay &lt;e23&gt; 
               
               
                 4 
                 ws4 
                 Pred &lt;ws1&gt; 
                 Relay &lt;e14&gt; 
               
               
                 5 
                 ws5 
                 Pred &lt;ws4&gt; 
                 Relay &lt;e45&gt; 
               
               
                 6 
                 ws6 
                 Pred &lt;ws4&gt; 
                 Relay &lt;e46&gt; 
               
               
                 7 
                 ws7 
                 Pred &lt;ws5, ws6&gt; 
                 Relay &lt;e57, e67&gt; 
               
               
                 8 
                 ws8 
                 Pred &lt;ws3, ws7&gt; 
                 Relay &lt;e38, e78&gt; 
               
               
                   
               
             
          
         
       
     
         [0129]    Step  62 : Verify the composition logic. 
         [0130]    Retrieve the newly generated DAG composition logic from the composition logic storing environment, and make judgment according to the following principles: 
         [0131]    Verify whether the composition logic is represented as a connected graph: if more than one independent node or node set exists, the verification fails. 
         [0132]    Check for loops: If the composition logic includes any loop, the verification fails. 
         [0133]    Check for any node whose in-degree is 0: If the in-degree of no node is 0, it indicates that the DAG is incomplete, and the composition logic verification fails. 
         [0134]    Check for any node whose out-degree is 0: If the out-degree of no node is 0, it indicates that the DAG is incomplete, and the composition logic verification fails. 
         [0135]    If the judgment result indicates that the logic meets requirements, go on with the following steps. 
         [0136]    Step  63 : Group paths. 
         [0137]    Group the paths for the DAG composition logic to obtain path groups: 
         [0138]    Group={{ 1 - 2 - 3 - 8 }, { 1 - 4 - 5 - 7 - 8 }, { 1 - 4 - 6 - 7 - 8 }}. 
         [0139]    Step  64 : Combine the dependent path groups. Put all dependent paths into an independent path group until no more paths are combinable. Output the final independent path groups. 
         [0140]    Combine path groups: Combine the dependent path groups in Group={{ 1 - 2 - 3 - 8 }, { 1 - 4 - 5 - 7 - 8 }, { 1 - 4 - 6 - 7 - 8 }} to obtain an independent path group: Group={{ 1 - 2 - 3 - 8 }, { 1 - 4 - 5 - 7 - 8 }, { 1 - 4 - 6 - 7 - 8 }}. The quantity of independent path groups is 1. 
         [0141]    Step  65 : Generate the process. 
         [0142]    The method for generating the process is: 
         [0143]    Step  651 : Judge the grouping result. If the grouping result is only one independent path group, perform operations according to the mode of the independent path group. If there are multiple independent path groups, output parallel information for each independent path group, mark the independent path group and then analyze and process. 
         [0144]    In this embodiment, the only independent path group is Group={{ 1 - 2 - 3 - 8 }, { 1 - 4 - 5 - 7 - 8 }, { 1 - 4 - 6 - 7 - 8 }} after the combining, and therefore, the process proceeds to step  652 . 
         [0145]    Step  652 : Judge the mode of the independent path group (there are four modes in total), perform operations according to the corresponding scenario, and output the corresponding sequence information and nodes. 
         [0146]    The processing method falls into four scenarios: 
         [0147]    (a) If all paths have the same head node and the same end node, output the same head node and the same end node first, delete the same head node and the same end node in all the paths, and analyze the remaining sub-paths. 
         [0148]    (b) If all paths have the same head node but different end nodes, output the same head node, and delete the same head node in all the paths, and then analyze the remaining sub-paths. 
         [0149]    (c) If all paths have the same end node but different head nodes, output the same end node, delete the same end node in all the paths, and then analyze the remaining sub-paths. 
         [0150]    (d) If neither the head node nor the end node is the same, group the nodes hierarchically in light of the WTOP algorithm because neither the parallel process nor the sequential process is applicable to conversion in this circumstance. Afterward, retrieve all head nodes whose in-degree is 0, and output such head nodes to the flow tag description concurrently, indicating parallel execution of all the services represented by the nodes whose in-degree is 0. Analyze the sub-path set without head nodes. 
         [0151]    Table 5 shows the results of executing the algorithm in the four scenarios. 
         [0000]    
       
         
               
             
               
               
               
               
               
             
               
               
               
               
               
               
             
           
               
                 TABLE 5 
               
             
             
               
                   
               
               
                 Execution results of four modes 
               
             
          
           
               
                   
                 (a) 
                 (b) 
                 (c) 
                 (d) 
               
               
                   
                   
               
             
          
           
               
                   
                 Path in the 
                 1-2-4 
                 1-2-4 
                 1-2-4 
                 2-4-8 
               
               
                   
                 independent 
                 1-3-4 
                 1-2-5 
                 3-4 
                 2-5-8 
               
               
                   
                 path group 
                   
                 1-3-5 
                   
                 3-5-8 
               
               
                   
                   
                   
                   
                   
                 3-6-7 
               
               
                   
                 Execution 
                 &lt;1&gt; 
                 &lt;1&gt; 
                 &lt;recur&gt; 
                 &lt;flow&gt; 
               
               
                   
                 result 
                 &lt;recur&gt; 
                 &lt;recur&gt; 
                 &lt;4&gt; 
                 &lt;2&gt; 
               
               
                   
                   
                 &lt;4&gt; 
                   
                   
                 &lt;3&gt; 
               
               
                   
                   
                   
                   
                   
                 &lt;/flow&gt; 
               
               
                   
                   
                   
                   
                   
                 &lt;recur&gt; 
               
               
                   
                   
               
             
          
         
       
     
         [0152]    In this embodiment, the processing mode is a (only one head node and one end node), and therefore, mode (a) applies. The output information is: 
         [0000]    
       
         
               
               
             
               
               
             
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 &lt;sequence&gt; 
               
               
                   
                  &lt;1&gt; 
               
             
          
           
               
                   
                 &lt;recur&gt; 
               
             
          
           
               
                   
                  &lt;8&gt; 
               
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                   
               
             
          
         
       
     
         [0153]    Because remaining nodes exist after the processing, the process proceeds to step  651 ; if the remaining nodes are in multiple independent path groups, the process proceeds to step  653  and step  654 . 
         [0154]    Step  653  and step  654 : First, mark the path group of the remaining sub-paths, output parallel information, and perform recursion for the multiple independent path groups to obtain the dependent path group: Group={{ 2 - 3 }, {{ 4 - 5 - 7 }, { 4 - 6 - 7 }}}. Go back to step  651  to determine that there are 2 independent path groups. Use the parallel process “flow” for describing, as shown in  FIG. 8 . In  FIG. 8 , the quantity of paths in the independent path group in the two dotted boxes is Size=1 and Size=2 respectively. Therefore, two scenarios exist: Independent path group  1  includes only one path, and therefore, sequential output is performed directly; independent path  2  includes more than one sub-path, and therefore, recursion is performed for all sub-paths in the group. The results are shown in Table 6: 
         [0000]    
       
         
               
             
               
               
               
             
               
               
               
             
           
               
                 TABLE 6 
               
             
             
               
                   
               
               
                 Execution result of FIG. 8 
               
             
          
           
               
                   
                 Independent path group 1 
                 Independent path group 2 
               
               
                   
                   
               
             
          
           
               
                 Path in the 
                 2-3 
                 4-5-7 
               
               
                 independent 
               
               
                 path group 
                   
                 4-6-7 
               
               
                 Execution result 
                 &lt;sequence&gt; 
                 &lt;sequence&gt; 
               
               
                   
                 &lt;2&gt; 
                 &lt;recur&gt; 
               
               
                   
                 &lt;3&gt; 
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;/sequence&gt; 
               
               
                   
               
             
          
         
       
     
         [0155]    The two independent path processes are described through a flow tag. The results generated in the process are shown in Table 7. 
         [0000]    
       
         
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
           
               
                 TABLE 7 
               
               
                   
               
               
                 Parallel process output of the independent path group in FIG. 8 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                   
                 &lt;flow&gt; 
               
             
          
           
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;2&gt; 
               
               
                   
                 &lt;3&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;recur&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
             
          
           
               
                   
                 &lt;/flow&gt; 
               
               
                   
                   
               
             
          
         
       
     
         [0156]    The whole output is: 
         [0000]    
       
         
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
               
               
             
           
               
                   
                   
               
             
             
               
                   
                 &lt;sequence&gt; 
               
               
                   
                 &lt;ws1/&gt; 
               
               
                   
                 &lt;flow&gt; 
               
             
          
           
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;ws2/&gt; 
               
               
                   
                 &lt;ws3/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;ws4/&gt; 
               
               
                   
                 &lt;flow&gt; 
               
             
          
           
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;ws5/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                 &lt;sequence&gt; 
               
             
          
           
               
                   
                 &lt;ws6/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
             
          
           
               
                   
                 &lt;/flow&gt; 
               
               
                   
                 &lt;ws7/&gt; 
               
             
          
           
               
                   
                 &lt;/sequence&gt; 
               
             
          
           
               
                   
                 &lt;/flow&gt; 
               
               
                   
                 &lt;ws8/&gt; 
               
               
                   
                 &lt;/sequence&gt; 
               
               
                   
                   
               
             
          
         
       
     
         [0157]    Step  655 : Collate the results. 
         [0158]    Step  66 : Fill the process. 
         [0159]    Fill the BPEL framework process in step  65  with the non-process information retrieved in step  60 , and generate an executable BPEL script. 
       Embodiment 4 
       [0160]    This embodiment provides an application server, as elaborated below by reference to  FIG. 9 . 
         [0161]    The application server includes: a central processor  90 , a process retrieving unit  91 , a process processing unit  92 , a process verifying unit  93 , a path grouping unit  94 , a process generating unit  95 , a process filling unit  96 , and a composition logic storing unit  97 . 
         [0162]    The central processor  90  is adapted to send control signaling to control other units. 
         [0163]    The process retrieving unit  91  is adapted to obtain the composition logic from the composition logic storing unit  97 . In this embodiment, the obtained composition logic is a BPEL composition logic, and the process retrieving unit  91  may be an XML parser. The XML parser retrieves the process information in the BPEL composition logic. The process information includes the operations such as &lt;sequence&gt;, &lt;flow&gt;, and the source “from” and the destination “to” in the operation &lt;assign&gt;. According to such information, the framework process of the BPEL composition logic may be obtained. Meanwhile, the process retrieving unit  91  may obtain non-process information such as variable definition and role definition. The process retrieving unit  91  may store the framework process of the BPEL composition logic into the composition logic storing unit  97 , or, instead of storing, send the framework process directly to the process processing unit  92  and the process filling unit  97  for subsequent processing. 
         [0164]    The process processing unit  92  is adapted to obtain the DAG composition logic. The process processing unit  92  obtains the process information and non-process information of BPEL from the process retrieving unit  91  or the composition logic storing unit  97 . The detailed operation process is as follows: 
         [0165]    The process processing unit  92  judges the “from” attribute and the “to” attribute of each &lt;assign&gt; element in the BPEL process. 
         [0166]    For the “from” attribute, if “from” is input by the user, the process processing unit  92  marks the “from” as NULL; if “from” is not input by the user and is not in the DAG description, the process processing unit  92  adds the “from” attribute into the DAG description, and records the “parent” of “from” as NULL; if “from” is in the DAG description, the process processing unit  92  goes on to judge the “to” attribute. 
         [0167]    For the “to” attribute, if “to” is not in the DAG description, the process processing unit  92  adds the “to” attribute into the DAG description, and adds the “from” attribute into its “parent” attribute; if the “to” attribute is in the DAG description, the process processing unit  92  adds the “from” attribute into its “parent” attribute. 
         [0168]    The process processing unit  92  repeats judging other “from” attributes and “to” attributes. As a result, the DAG description includes all the nodes corresponding to the web services, and the whole DAG description is constructed through the parent relation. 
         [0169]    According to the generated DAG description, a DAG composition logic may be generated and stored into the composition logic storing unit  97 , or sent to the process verifying unit  93  directly, or sent to the path grouping unit  94  directly. 
         [0170]    The process verifying unit  93  is adapted to verify the DAG composition logic generated by the process processing unit  92  and transmit the DAG composition logic to the path grouping unit  94  if the verification succeeds. The process verifying unit  93  may obtain the DAG composition logic for verification from the process processing unit  92  or from the composition logic storing unit  97 . The process verifying unit  93  is optional. The DAG composition logic may be sent to the path grouping unit  94  directly for subsequent processing without being verified by the process verifying unit  93 . 
         [0171]    The detailed verification method is as follows: 
         [0172]    The process verifying unit  93  verifies whether the composition logic is represented as a connected graph: If more than one independent node or node set exists, the verification fails. 
         [0173]    The process verifying unit  93  checks for loops: If the composition logic includes any loop, the verification fails. 
         [0174]    The process verifying unit  93  checks for any node whose in-degree is 0: If the in-degree of no node is 0, it indicates that the DAG is incomplete, and the composition logic verification fails. 
         [0175]    The process verifying unit  93  checks for any node whose out-degree is 0: If the out-degree of no node is 0, it indicates that the DAG is incomplete, and the composition logic verification fails. If the verification succeeds, the process verifying unit  93  sends the verified DAG composition logic to the path grouping unit  94 . 
         [0176]    The path grouping unit  94  is adapted to group the paths for the DAG composition logic. 
         [0177]    The path grouping unit  94  applies the depth-first-traversal method to the DAG composition logic to obtain all path groups from the head node to the end node. Those skilled in the art are aware that other methods may be applied in place of the depth-first traversal method to obtain all path groups from the head node to the end node. 
         [0178]    The process generating unit  95  is adapted to receive the grouping result of the path grouping unit  94 , and analyze and handle the result to generate a BPEL framework process. 
         [0179]    The process generating unit  95  includes a path group combining module  951  and a framework generating module  952 . 
         [0180]    The path group combining module  951  combines all dependent paths into one path group according to the path grouping result until no more paths are combinable, and outputs the final independent path groups to the framework generating module  952 . 
         [0181]    After receiving the combining result from the path group combining module  951 , the framework generating module  952  judges the grouping result first. If the grouping result is only one independent path group, the framework generating module  952  performs operations according to the mode of the independent path group, and outputs the corresponding sequence information and nodes. If there are two or more independent path groups, the framework generating module  952  outputs parallel information for each independent path group, marks the independent path group and performs recursion, and then judges the grouping again. According to the grouping judgment result, the analysis in the framework generating module is repeated. 
         [0182]    The framework generating module collates the sequence information, node information and parallel information of each independent path group, and outputs a BPEL framework process. After the framework generating module finishes the operations, the BPEL composition logic is converted to a BPEL framework process which supports nesting of parallel processes. 
         [0183]    The process filling unit  96  receives the BPEL framework process from the process generating unit  95  or the composition logic storing unit  97 , receives the non-process information from the process retrieving unit  91  or the composition logic storing unit  97 , fills the BPEL framework process with the non-process information, and generates an executable BPEL script. The executable BPEL script supports generation of nested parallel processes on the basis of retaining the data dependency and execution dependency of the original composition logic. 
         [0184]    The composition logic storing unit  97  is adapted to store the BPEL composition logic, the DAG composition logic, the BPEL framework process generated by the process retrieving unit  91 , and other non-process information. The composition logic storing unit is optional on the application server, and may be independent of the application server. 
       Embodiment 5 
       [0185]    This embodiment provides an application server, which converts a BPEL composition logic into a DAG composition logic. 
         [0186]    As shown in  FIG. 10 , the application server includes: a central processor  100 , a process retrieving unit  101 , a process processing unit  102 , and a composition logic storing unit  103 . 
         [0187]    The central processor  100  is adapted to send control signaling to control other units. 
         [0188]    The process retrieving unit  101  is adapted to obtain the composition logic from the composition logic storing unit  103 . In this embodiment, the obtained composition logic is a BPEL composition logic, and the process retrieving unit  101  may be an XML parser. The XML parser retrieves the process information in the BPEL composition logic. The process information includes the operations such as &lt;sequence&gt;, &lt;flow&gt;, and the source “from” and the destination “to” in the operation &lt;assign&gt;. According to such information, the framework process of the BPEL composition logic may be obtained. Meanwhile, the process retrieving unit  101  may obtain non-process information such as variable definition and role definition. The process retrieving unit  101  may store the framework process of the BPEL composition logic into the composition logic storing unit  103 , or, instead of storing, send the framework process to the process processing unit  102  directly for subsequent processing. 
         [0189]    The process processing unit  102  is adapted to obtain the DAG composition logic. The process processing unit  102  obtains the framework process and non-process information of BPEL from the process retrieving unit  101  or the composition logic storing unit  103 . The detailed operation process is as follows: 
         [0190]    The process processing unit  102  judges the “from” attribute and the “to” attribute of each &lt;assign&gt; element in the BPEL framework process. 
         [0191]    For the “from” attribute, if “from” is input by the user, the process processing unit  102  marks the “from” as NULL; if “from” is not input by the user and is not in the DAG description, the process processing unit  102  adds the “from” attribute into the DAG description, and records the “parent” of “from” as NULL; if “from” is in the DAG description, the process processing unit  102  goes on to judge the “to” attribute. 
         [0192]    For the “to” attribute, if “to” is not in the DAG description, the process processing unit  102  adds the “to” attribute into the DAG description, and adds the “from” attribute into its “parent” attribute; if the “to” attribute is in the DAG description, the process processing unit  102  adds the “from” attribute into its “parent” attribute. 
         [0193]    The process processing unit  102  repeats judging other “from” attributes and “to” attributes. As a result, the DAG description includes all the nodes corresponding to the web services, and the whole DAG description is constructed through the parent relation. 
         [0194]    According to generated DAG description, a DAG composition logic may be obtained and stored into the composition logic storing unit  103 . 
         [0195]    The composition logic storing unit  103  is adapted to store the BPEL executable script, the BPEL framework process generated by the process retrieving unit  91 , other non-process information and the DAG composition logic. 
       Embodiment 6 
       [0196]    This embodiment provides an application server, which converts a DAG composition logic into an executable BPEL script. 
         [0197]    As shown in  FIG. 11 , the application server includes: a central processor  110 , a process verifying unit  111 , a path grouping unit  112 , a process generating unit  113 , a process filling unit  114 , and a composition logic storing unit  115 . 
         [0198]    The central processor  110  is adapted to send control signaling to control other units. 
         [0199]    The process verifying unit  111  is adapted to: obtain the DAG composition logic from the composition logic storing unit  115  and verify the logic; and transmit the DAG composition logic to the path grouping unit  112  if the verification succeeds. The process verifying unit  111  is optional. 
         [0200]    The DAG composition logic may be sent to the process grouping unit  112  directly for subsequent processing without being verified by the process verifying unit  111 . 
         [0201]    The detailed verification method is as follows: 
         [0202]    The process verifying unit  111  verifies whether the composition logic is expressed as a connected graph: If more than one independent node or node set exists, the verification fails. 
         [0203]    The process verifying unit  111  checks for loops: If the composition logic includes any loop, the verification fails. 
         [0204]    The process verifying unit  111  checks for any node whose in-degree is 0: If the in-degree of no node is 0, it indicates that the DAG is incomplete, and the composition logic verification fails. 
         [0205]    The process verifying unit  111  checks for any node whose out-degree is 0: If the out-degree of no node is 0, it indicates that the DAG is incomplete, and the composition logic verification fails. If the verification succeeds, the process verifying unit  111  sends the verified DAG composition logic to the path grouping unit  112 . 
         [0206]    The path grouping unit  112  is adapted to group the paths for the DAG composition logic. The path grouping unit  112  applies the depth-first-traversal method to the DAG composition logic to obtain all path groups from the head node to the end node. Those skilled in the art are aware that other methods may be applied in place of the depth-first traversal method to obtain all path groups from the head node to the end node. 
         [0207]    The process generating unit  113  is adapted to receive the grouping result of the path grouping unit  112 , and analyze and handle the result to generate a BPEL framework process. 
         [0208]    The process generating unit  113  includes a path group combining module  1131  and a framework generating module  1132 . 
         [0209]    The path group combining module  1131  combines all dependent paths into one path group according to the path grouping result until no more paths are combinable, and outputs the final independent path groups to the framework generating module  1132 . 
         [0210]    After receiving the combining result from the path group combining module  1132 , the framework generating module  1131  judges the grouping result first. If the grouping result is only one independent path group, the framework generating module performs operations according to the mode of the independent path group, and outputs the corresponding sequence information and nodes. If there are two or more independent path groups, the framework generating module outputs parallel information for each independent path group, marks the independent path group and performs recursion, and then judges the grouping again. According to the grouping judgment result, the analysis in the framework generating module is repeated. 
         [0211]    The framework generating module collates the sequence information, node information and parallel information of each independent path group, and outputs a BPEL framework process. After the framework generating module finishes the operations, the BPEL composition logic is converted to a BPEL framework process which supports nesting of parallel processes. 
         [0212]    The process filling unit  114  receives the BPEL framework process from the process generating unit  113  or the composition logic storing unit, receives the non-process information from the process retrieving unit, fills the BPEL framework process with the non-process information, and generates an executable BPEL script. The executable BPEL script supports generation of nested parallel processes on the basis of retaining the data dependency and execution dependency of the original composition logic. 
         [0213]    The composition logic storing unit  115  is adapted to store the DAG composition logic, the BPEL framework process generated by the process retrieving unit  91 , other non-process information, and the executable BPEL script generated by the process filling unit  114 . 
         [0214]    After reading the foregoing embodiments, those skilled in the art are clearly aware that the present disclosure may be implemented through hardware, or through software in addition to a necessary universal hardware platform. Therefore, the technical solution under the present disclosure may be embodied as a software product. The software product may be stored in a non-volatile storage medium (such as CD-ROM, USB flash disk, or mobile hard disk), and may include several instructions that enable a computer device (such as personal computer, server, or network device) to perform the methods provided in the embodiments of the present disclosure. 
         [0215]    Although the disclosure has been described through several preferred embodiments, the disclosure is not limited to such embodiments. It is apparent that those skilled in the art can make modifications and variations to the disclosure without departing from the scope of the disclosure. The disclosure is intended to cover the modifications and variations provided that they fall in the scope of protection defined by the following claims or their equivalents.