### WS-BPEL Flow Example with Links Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index An example demonstrating the use of , , , and elements to define control flow dependencies between activities. This example shows links crossing boundaries of structured activities like . ```xml ``` -------------------------------- ### XPath 1.0 Examples in WS-BPEL Context Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Shows examples of how XPath 1.0 expressions are evaluated within the WS-BPEL context. These examples cover retrieving single XML infoset items, collections of items, sequences of CIIs for simple types, and variable references. ```xpath $myFooVar/lines/line[2] ``` ```xpath $myFooVar/lines/* ``` ```xpath $myFooVar/lines/line[2]/text() ``` ```xpath $myFooVar ``` -------------------------------- ### WS-BPEL 2.0: Example Flow with Links and Activities Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Illustrates a WS-BPEL 2.0 flow with 'toSkipped' and 'fromSkipped' links. This example demonstrates control dependencies between 'receive', 'empty' (within an 'if'), and 'reply' activities, showing how transitive dependencies are maintained even when an activity is skipped. ```xml ... ... ``` -------------------------------- ### WS-BPEL Query/Expression Example Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Provides an example of a WS-BPEL fragment demonstrating the usage of a query or expression within a `` element. This illustrates how a variable reference is used in an expression. ```xml $myVar/abc/def ``` -------------------------------- ### Illegal WS-BPEL Flow with Non-Start Activity Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This example illustrates an illegal WS-BPEL flow where an `` activity follows a `` activity marked with `createInstance="yes"`. In WS-BPEL, non-start activities must have a control dependency on a start activity. ```xml ``` -------------------------------- ### WS-BPEL 2.0: Catch Construct Examples Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Illustrates different configurations of the construct in WS-BPEL 2.0, demonstrating matching by faultName, faultVariable, and faultMessageType. ```xml ``` -------------------------------- ### WS-BPEL 2.0 Variable Declaration Example with Namespace Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This example shows a concrete instance of a variable declaration, including a namespace prefix and a qualified name for the message type. This demonstrates how to use namespaces in BPEL variable definitions. ```xml ``` -------------------------------- ### EII-to-EII Comparison Copy in WS-BPEL Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Provides a comparative example of an EII-to-EII copy operation, distinct from EII-to-TII. This example copies the entire 'approvedLimit' element to 'approvalNotice4Var', including its attributes. ```xml $creditApprovalVar/tns:approvedLimit $approvalNotice4Var ``` -------------------------------- ### WS-BPEL 2.0 Process with Extensions and Documentation Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index An example of a WS-BPEL 2.0 abstract process demonstrating the use of extension attributes and documentation tags. It shows how to declare extensions, define partner links with documentation, and use opaque activities with embedded documentation for process steps. ```xml We have not confirmed our home information verification partner yet. Pick an appraisal request from one of 3 customer referral channels. Transform one of these 3 appraisal request into our own format. Extract customer and housing info from our appraisal request into a message understood by our home info verification partner. This step confirms whether we have received the verification result. It is intended to match the "receive verification result" step. Relay the appraisal request and home info verification to an appraiser, who is responsible for on-site inspection. The appraiser may request further verification info from the partner through this business process. We will also receive the results of the appraisal from this step. Send the appraisal result back to the corresponding referral channel. ``` -------------------------------- ### WS-BPEL 2.0: Flow with Receive and Assign Activities Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index An example illustrating the allowed sequence of and activities within a in WS-BPEL 2.0. This demonstrates how the activity can follow a activity without violating execution order constraints. ```xml ... ``` -------------------------------- ### WS-BPEL 2.0 Partner Link Type Declaration Example Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Illustrates the basic syntax for declaring a `` in WS-BPEL, defining roles and their corresponding WSDL `portType`s. ```xml ``` -------------------------------- ### WS-BPEL Example Variable Declaration (Message Type) Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index An example of a WS-BPEL variable declaration using a message type defined in a WSDL document. It demonstrates how to reference a WSDL message type using a qualified name (QName). ```xml ``` -------------------------------- ### WS-BPEL 2.0: Invoke with Local Handlers Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Example of an activity in WS-BPEL 2.0 that includes local catch and compensationHandler elements. This demonstrates the direct attachment of fault and compensation logic to an invoke operation. ```xml ... ``` -------------------------------- ### WS-BPEL 2.0 Variable Declaration Syntax Example Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This snippet illustrates the informal syntax for declaring a variable within a BPEL process. It shows the structure of the element and its attributes, including optional fields and cardinality. ```xml + from-spec? ``` -------------------------------- ### WS-BPEL 2.0: Equivalent Scope with Handlers Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This XML snippet shows the WS-BPEL 2.0 equivalent of the previous example. It uses a activity to encapsulate the and includes faultHandlers and a compensationHandler, demonstrating semantic equivalence. ```xml ... ``` -------------------------------- ### Example Service Reference Container in WS-BPEL Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Demonstrates the structure of a service reference container (``) used in WS-BPEL for wrapping endpoint references. It shows the use of the `reference-scheme` attribute and a child element representing the actual EPR. ```xml ... ``` -------------------------------- ### BPEL Flow with Dead Path Elimination Example Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This BPEL snippet demonstrates the use of a activity with the suppressJoinFailure attribute set to 'yes'. It defines links and join conditions to illustrate concurrent execution of activities and the impact of DPE when link conditions are not met. ```xml $buyToSettle and $sellToSettle ``` -------------------------------- ### WS-BPEL 2.0: forEach Counter Values Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Details the WS-BPEL 2.0 elements for defining counter values within a `` loop, including start, final, and branches. ```xml ``` -------------------------------- ### WS-BPEL Assign Example with XPath Expressions Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index A WS-BPEL assignment snippet showcasing the use of XPath 1.0 expressions involving multiple variables and arithmetic operations to transform data between different parts of a BPEL process. ```xml $po/lineItem[@prodCode=$myProd]/amt * $exchangeRate $convertedPO/lineItem[@prodCode=$myProd]/amt ``` -------------------------------- ### WS-BPEL 2.0 Flow Example with Parallel Invokes Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Illustrates the use of the activity in WS-BPEL 2.0 to execute two activities concurrently. The 'transferMoney' is executed only after both the seller and shipper responses are received, demonstrating synchronization. ```xml ``` -------------------------------- ### WS-BPEL Flow with Explicit Links and Default Transition Conditions Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This WS-BPEL 2.0 example rewrites a previous flow by using explicit links between activities A, B, and C, instead of a sequence. It includes default transition conditions (implicitly 'true') for links AtoB and BtoC. With a disjunction as the default join condition and a 'true' transition condition for AtoB, the join condition for B will always evaluate to true, ensuring B and C are executed. ```xml P:funcXB() P:funcYB() ``` -------------------------------- ### WS-BPEL 2.0 Scope with Invokes and Fault Handlers Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index An example illustrating a WS-BPEL 2.0 containing a primary activity with two concurrent activities. It also shows the declaration of that are shared by both invoke activities, demonstrating how to catch potential fault responses. ```xml ... ``` -------------------------------- ### WS-BPEL: Iterative Document Construction with bpel:doXslTransform and Global Parameters Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This example illustrates how to iteratively build an XML document in WS-BPEL using bpel:doXslTransform. It shows how to pass a WS-BPEL variable as an XSLT global parameter (named 'NewItem') to an XSLT stylesheet for appending data within a loop. ```xml ... bpel:doXslTransform( "urn:stylesheets:AddToPO.xsl", $PO, "NewItem", $OutVar) ``` -------------------------------- ### WS-BPEL 2.0 Purchase Order Process Definition Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index The main WS-BPEL process definition for handling a purchase order. It includes documentation, partner link definitions, and placeholders for variables and fault handlers. This sets up the interaction with various services. ```xml A simple example of a WS-BPEL process for handling a purchase order. ... ... ``` -------------------------------- ### WS-BPEL Invoke Activity Syntax Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This snippet shows the general syntax for the WS-BPEL activity. It includes attributes for specifying the partner, operation, and variables for input and output. Optional elements for correlations, fault handling, and parts are also outlined. ```xml standard-elements ? + * activity ? activity ? activity ? + ? + ``` -------------------------------- ### WS-BPEL Flow with Synchronization Dependencies (suppressJoinFailure='yes') Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This WS-BPEL 2.0 example shows a flow where 'suppressJoinFailure' is set to 'yes'. Similar to the previous example, it involves synchronization dependencies on activity B from activities X and Y. However, when 'suppressJoinFailure' is 'yes', the bpel:joinFailure fault is suppressed, allowing activity C to execute even if the join condition for B is not met. ```xml P:funcXB() ... P:funcYB() ... ... ``` -------------------------------- ### WS-BPEL 2.0 Auction Service Process Definition Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This snippet defines the main WS-BPEL 2.0 process for an auction service. It includes imports, partner links for seller, buyer, and registration services, variable declarations, correlation sets, and the core sequence of operations. It handles concurrent reception of seller and buyer information, invokes an auction registration service, and sends responses back to the seller and buyer. ```bpel http://example.com/auction/ RegistrationService/ as:RegistrationService $auctionData.auctionHouseEndpointReference $sellerData.auctionId $auctionData.auctionId 1 $auctionData.amount $sellerData.endpointReference Thank you! $sellerAnswerData.thankYouText $buyerData.endpointReference Thank you! $buyerAnswerData.thankYouText ``` -------------------------------- ### WS-BPEL 2.0 Ordering Service Process Definition Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index The main WS-BPEL 2.0 process definition for the Ordering Service. It includes imports, partner links, variables, correlation sets, and the core sequence of activities. ```xml $order.OrderMessagePart/order:OrderMessageHeader/ order:orderID $shippingRequestMsg/order:ShipRequestMessageHeader/ order:orderID $order.OrderMessagePart/order:ShippingInfo $shippingRequestMsg/order:ShippingInfo $order.OrderMessagePart/order:OrderMessageHeader/ order:orderID $orderAckMsg.OrderAckMessagePart/ order:OrderAckMessageHeader/order:orderID $orderAckMsg.OrderAckMessagePart/order:Ack $orderAckMsg.OrderAckMessagePart/order:Ack $shipHistoryMsg.ShipHistoryMessagePart/order:Event If we receive notice that the ship has completed, update our ship history accordingly ``` -------------------------------- ### WS-BPEL XPath Restriction in Element Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This rule specifies that when using an XPath expression within the '' element of an 'assign' activity, the expression must start with an XPath VariableReference. ```xpath $myVariable/somePath ``` -------------------------------- ### WS-BPEL: Standard Elements for Activity Synchronization Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Describes the optional 'targets' and 'sources' elements used for defining synchronization relationships between activities via links. Includes 'joinCondition' and 'transitionCondition' for controlling flow. ```xml ? ? bool-expr + ? + ? bool-expr ``` -------------------------------- ### AII-to-AII Copy in WS-BPEL Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Demonstrates an Attribute-to-Attribute (AII-to-AII) copy operation in WS-BPEL, where the value of one attribute is copied to another. This example copies the 'amt' attribute from order details to billing details. ```xml $orderDetailVar/@amt $billingDetailVar/@amt ``` -------------------------------- ### WS-BPEL Abstract Process Structure Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Illustrates the structure of a WS-BPEL Abstract Process, highlighting the permitted attributes. Key attributes include 'name', 'targetNamespace', 'abstractProcessProfile', and optional attributes like 'queryLanguage' and 'expressionLanguage'. ```xml ... ``` -------------------------------- ### Example: Cyclic Peer-Scope Dependency in WS-BPEL Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Illustrates a WS-BPEL process definition with a cyclic peer-scope dependency between SC1 and SC2, which would be rejected by a WS-BPEL processor due to violations of Rule 2. ```xml ... ... ... ... ... ... ... ... ``` -------------------------------- ### Applying Extension Element to Invoke Activities Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Example demonstrating an extension element 'foo:invokeProperty' applied to a scope. This extension element can affect all invoke activities within that scope, unlike attribute extensions. ```xml ... SomeNature ... ``` -------------------------------- ### WS-BPEL: Sequential Activity Execution with Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index The activity executes one or more contained activities in the order they are defined. The sequence completes only after the last activity within it has finished execution. ```xml standard-elements activity+ ``` ```xml ... ... ... ``` -------------------------------- ### WS-BPEL While Activity for Conditional Looping Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index The activity repeatedly executes a contained activity as long as a Boolean condition remains true. The condition is evaluated at the start of each iteration. It requires a element and an to be performed. ```xml standard-elements bool-expr activity Example: $orderDetails > 100 ... ``` -------------------------------- ### WS-BPEL 2.0 Pick Activity Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index The activity waits for one of several triggers (message arrival or alarm) to occur. It executes associated activities and supports correlation and message parts. ```xml standard-elements + ? + ? + activity * ( duration-expr | deadline-expr ) activity ``` -------------------------------- ### EII-to-TII Copy in WS-BPEL Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Demonstrates an Entity-to-Text (EII-to-TII) copy operation, transferring data from an XML element to the text content of another element. This example copies the approved limit to the text content of an approval notice. ```xml $creditApprovalVar/tns:approvedLimit $approvalNotice3Var/text() ``` -------------------------------- ### Applying Extension Attribute to Invoke Activity Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Example showing an extension attribute 'foo:invokeProperty' applied to an invoke activity. This attribute is qualified by a namespace declared elsewhere and affects specific activities within its scope. ```xml ... ... ``` -------------------------------- ### WS-BPEL Pick Activity for Event-Driven Selection Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index The activity waits for and processes exactly one event from a set of possibilities ( or ). Once an event is selected, others are discarded. It requires at least one and can optionally include for timed events. ```xml standard-elements + ? + ? + activity * ( duration-expr | deadline-expr ) activity Example: 'P3DT10H' ``` -------------------------------- ### EII-to-AII Copy in WS-BPEL Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Shows an Entity-to-Attribute (EII-to-AII) copy operation, where data from an XML element is copied to an attribute of another element. This example copies the approved limit from a credit application to the 'amt' attribute of an approval notice. ```xml $creditApprovalVar/tns:approvedLimit $approvalNotice2Var/@amt ``` -------------------------------- ### WS-BPEL 2.0: createInstance Attribute Rule Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index When a activity has a 'createInstance' attribute set to 'yes', all its enclosed events must be events. This ensures that a new process instance is initiated only through message reception. It applies to the 'createInstance' attribute of and the types of events within it. ```xml ``` -------------------------------- ### EII-to-TII Copy with Potential Fault in WS-BPEL Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Illustrates an EII-to-TII copy operation that may result in a `selectionFailure` fault if the target text node does not exist. This example attempts to copy an approved limit to a potentially empty text node. ```xml $creditApprovalVar/tns:approvedLimit $approvalNotice4Var/text() ``` -------------------------------- ### WS-BPEL 2.0 Sequence Activity Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index The activity executes a collection of child activities in their defined lexical order. ```xml standard-elements activity+ ``` -------------------------------- ### EII-to-EII Copy in WS-BPEL Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Demonstrates an Entity-to-Entity (EII) copy operation in WS-BPEL, where the content of one XML element is copied to another. This example shows copying shipping address data from one poHeader to the billing address of another. ```xml $poHeaderVar1/tns:shippingAddr $poHeaderVar2/tns:billingAddr ``` -------------------------------- ### WS-BPEL Receive Activity Syntax Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index This defines the syntax for the `` activity in WS-BPEL. It specifies attributes like `partnerLink`, `portType`, `operation`, `variable`, `createInstance`, and `messageExchange`, along with optional child elements for correlations and fromParts. ```xml standard-elements ? + ? + ``` -------------------------------- ### XPath 1.0 Example: Unqualified Element Access Failure Source: https://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html/index Illustrates a scenario where an XPath 1.0 expression fails to select an element because it uses an unqualified name, and the element in the variable has a namespace. This highlights the importance of namespace handling in XPath. ```xml $FooVar/bar/text() ```