Transformation from UML to BPEL

Source: Internet
Author: User

How does one orchestrate web services through BPEL? Some companies call it a web services workflow, which means that the basic web services protocol stack soap/WSDL/UDDI has been used.

BPEL is used to construct the decision chain or workflow of these web services. To build as many Web Services-based business processes as possible and bond them together with BPEL, each independent service must be precisely balanced. The use of coarse-grained web services is more important than the overall goal of using BPEL to create different decision chains, because they may be a complete business process. Similarly, fine-grained services are not conducive to reuse and building a BPEL workflow.

This process is essentially similar to the object-oriented design, that is, an object must do enough work to prove its existence to be considered as an upper-layer calling object. Therefore, we can consider web services in the same way, that is, we can use the Object-Oriented Modeling Language UML to build a BPEL workflow.

By examining 13 Modeling Elements of uml2.0, we can find that many models are suitable for building BPEL workflows, such as activity diagrams and sequence diagrams in dynamic models. At the same time, the combination structure diagram and class diagram in the static model can also describe the static links of workflow activities.

Activity graphs are widely used to describe the actions of operations (class methods) and the internal work processes of Use Cases and objects. The activity diagram is changed from the state chart. They are used for different purposes. The activity diagram captures the action (the work or activity to be executed) and the result of the action based on the changes in the object state. An activity in the activity diagram immediately enters the next activity after the activity ends (changes in the status diagram may need to be triggered by an event ). Main elements in the activity diagram:

An operation can be described as a series of related activities. The activity has only one starting point, but multiple ending points. Inter-activity transfer allows events, actions, and guard conditions. An activity can be followed by another activity in sequence. This is a simple sequential relationship. If a diamond flag is used in the activity diagram, the condition relationship can be expressed. The judgment mark can have multiple input and output transitions, however, only one of the outputs is triggered during the activity.

The activity diagram is also useful for expressing concurrent behaviors. In the activity diagram, a horizontal crude line called a synchronization bar can divide a transfer into multiple concurrent execution branches, or merge multiple transfers into one. At this time, only if all input transfers are valid, the synchronization will trigger the transfer and then execute the subsequent activities, as shown in figure 2.

A sequence diagram is used to describe the dynamic interaction between objects, focusing on the time series of message transmission between objects. A sequence chart has two axes: the horizontal axis represents different objects, and the vertical axis represents time. Objects in a sequence diagram are displayed in a rectangle with a vertical dotted line and marked with the object name and class name. The vertical dotted line is the lifeline of an object, which indicates that the object exists in a certain period of time. Communication between objects is represented by drawing messages between the object's lifeline. The arrow of the message indicates the type of the message.

Messages in a sequence diagram can be signals, operation calls, RPC (Remote Procedure CALS) in C ++, and RMI (Remote Method Invocation) in Java ). When a message is received, the receiving object immediately starts executing the activity, that is, the object is activated. Activation is indicated by displaying a long rectangular box on the object lifecycle line.

Class diagrams describe the static relationship between classes. Different from the data model, it not only displays the structure of information, but also describes the behavior of the system. Class graphs are the basis for defining other graphs.

Composite Structure Diagram is a new static structure diagram of uml2.0. It is used to describe the internal structure of a part of the system (that is, the "Composite Structure"), including the interaction points between this part and other parts of the system; it displays the configurations of "internal" Participants in the content. The composite structure has several important concepts, such as ports and protocols.

Port isolates the combination structure from its external environment to implement bidirectional encapsulation, that is, it covers the behavior provided by the combination structure (provided interface ), it also points out the services (required interface) required for the combination structure)

Based on the concept of collaboration in UML, protocol displays reusable interaction sequences, the essence is to describe the collaboration modes that can be reused in different contexts, and the tasks reflected in the Protocol are undertaken by the specific "Port.

These concepts in the composite structure diagram are very suitable for describing the static relationship between components in Web services. Thus, the Service Interface corresponding to the service flow of the BPEL can be generated, that is, the WSDL.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.