Basic activity basic activities are the simplest form of interaction with the outside world. They are disordered individual steps, interact with services, operate data or processing exceptions.
The Web service interaction process can be interactively interact with the outside world: , , and . As we see in the previous article, the process's partners interact by using these three activities. By specifying PortType, operations, and partners, each of these activities identifies the web service call it belongs to.
The process is available in the "Invoke" activity call partner. In addition to portType, partners, and operations, the call also specifies the input container and output container for the input and output of the operation being called. The call may be synchronized (request / response) or asynchronous (one direction). In the latter case, only the container needs to be input.
Business processes provide services for its partners through a pair of and activities. Receive indicates the input of the WSDL operation provided by the process. If the process needs to return a response to a partner sent to the message, then Reply activity is required. In the process, multiple reply activities can be defined to answer the call of the partner; however, only one matching is activated at a time. Appropriate reply activity matches is done at runtime, and the process is looking for such an activity - ready to run and owns the same porttype, operations, and partners as the . For example, the process may place the received message in a container (container A), if a condition returns to the message in the container A, otherwise, a message from another container (container B) is returned. In this case, Receive will have two links with this condition; these two links will be linked to two Reply activities, only one of the Reply activities will be activated and returned to the partner.
A business process instance is only available when a message is sent to the special tag activity or activity. Several Receive activities point out that by setting the CreateInstance property to truth, they can create a process instance. Activity will have an onMessage element that also has a CreateInstance property and is set to true. The activity will be described in more detail later in this article. The first RECEIVE activity that is tagged and obtained a message will create an instance, then the remaining Receive activity is treated as a regular receive activity in this instance.
At this point, you may want to know how to create a second instance. Correlation is used to figure out which instance is sent to the incoming message. All Receive and OnMessage that can start processes must have the same correlation settings. Therefore, when a message comes in, the process checks it to understand whether it contains a correlation setting that matches the existing instance. If this message meets the conditions, the process sends it to that instance. Otherwise, the process will create a new instance based on the operation of the incoming message, the PortType and partner information matching the Receive activity. The correlation in BPEL will be discussed in detail in this series.
Operating data: Activity Activity can be used to copy data from one container to another, or can be used to construct and insert new data by using an expression. The use of expressions is mainly due to the need to perform simple computing (such as increasing sequence numbers), which is required to describe business protocol behavior. The expression is operated for message selection, attribute, and text constant to generate a new value for container properties or select. Each activity contains one or more elements; each element exactly includes a element and a element. There are various forms of elements and elements, the most important thing to remember is that the value represented from the source () to the destination () must be type compatible.
A simple form is specified in the name of the name. When you use the source that specifies only one container, the entire message will be copied; this means that the destination must also specify only one container.
More complicated forms a container and one component in the container. When using this form, the destination must also specify a container and one of them.
The third form of specifies the general expression to be evaluated with XPath. The expression can be anything allowed XPath, as long as the expression returns the XPath value type (string, value or Boole). When this form is used, the destination must specify a container and one of them.
Briefly, the message can overwrite other messages, and the message component can overwrite other message components. Since the expression does not return a complete message, they are only used to override the message component.
Because it is necessary to enable XPath expressions to access information from the process, BPEL4WS introduces several XPath extensions. These extended functions are defined in the standard BPEL4WS namespace http://schemas.xmlsoap.org/ws/2002/07/business-process/, the prefix BPWS is associated with this namespace.
One example of one of these functions is as follows.
BPWS: GetContainerdata ("ContainerName", "partname", "locationPath"?)
In this example, ContainerName is the name of the container, and Partname is the name of a component in the container, where LocationPath is an absolute position path in this specified part, which is optional.
Any XPath expression that wants to retrieve data from a container in the process can use the bpws: getContainerData () function, as if it is the built-in XPath function.
Note: In addition to copying messages, components, and expressions, activities can also be used to copy service reference to partner links and replicaing services from partner links.
Other basic activities can issue fault signals in activity in BPEL4WS. In order for you to use a failed handler to finalize the fault and processes it, the language requires a global unique QNAME. An optional container can be added, which points to the location where the data related to the fault can be found. For example, you may have a activity that issues a certain fault signal, and then there is a fault handler with , which sends information about the fault to the partner. This reply will use the container specified in the fault activity.
The activity can be used to discard all execution in the business process instance of the termination activity. Activity allows the process to wait for a specific time interval or waited until a certain deadline.
does not do anything. If you need to capture a fault and suppress it, you can use this activity.