Upload
rivka
View
43
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Module 10: Creating Transactional Business Processes. Overview. Lesson 1: Introduction to Transactions Lesson 2: Configuring Transactions. Lesson 1: Introduction To Transactions . What Are Transactions? What Is Instance Persistence? Persistence Points in an Orchestration - PowerPoint PPT Presentation
Citation preview
Module 10:Creating TransactionalBusiness Processes
Overview
Lesson 1: Introduction to Transactions Lesson 2: Configuring Transactions
Lesson 1: Introduction To Transactions
What Are Transactions? What Is Instance Persistence?Persistence Points in an OrchestrationSteps for Setting Up a Transaction
Transaction Types
Atomic — provide rollback capabilitiesLong-running — save state at persistence points
What Are Transactions?
Scope Shape
Framework for transactionsEnables exception handlingEnables compensation handling
Scope{ }
Drop a shape fromthe toolbox here
What Is Instance Persistence?
State Persistence
Orchestration engine manages the persistence and restoration of orchestration service instancesCritical when resources required by service instances are greater than resources available
Persistence Functions
Dehydration and rehydration Instance recovery Transaction compensation Controlled system shutdown
Persistence PointsPersistence Point
Persistence Points in an Orchestration
MessageBox
Message sent within anon-atomic scope End of transactional scope Starting a new orchestration instance (Start Orchestration shape)Debug break pointDehydrationOrchestration completesSystem shutdown
Persist State
Create a scope1
Determine if the transaction requires compensation3
Identify potential errors4
Add appropriate exception handlers5
Define compensation code6
Identify the type of transaction required2
Steps for Setting Up a Transaction
Lesson 2: Configuring Transactions
Defining an Orchestration as TransactionalCreating a Long-Running TransactionCreating an Atomic TransactionCreating Modular Business Processes Demonstration: Creating TransactionsAdding Compensation CodeDemonstration: Adding Compensation Code
Defining an Orchestration as Transactional
Transactional orchestration
Use to define an entire orchestration as transactionalYou can nest a long-runningor atomic transaction withina transactional orchestrationYou cannot nest a transactional scope within an orchestration that is not transactional Set the Transaction Type property to specify the transaction type forthe orchestration
Long-Running TransactionLong-running transactions
May run for an extended timeUsed when ACID properties arenot requiredData is not locked and can be modifiedIndividual steps are committed during the transactionThe transaction itself is not committed until the last statement has completedCan be nested to provideatomic components
Creating a Long-Running Transaction
Loan application received
Request Credit Report
Order Appraisal
Sign Documents
Creating an Atomic Transaction
Atomic Transactions
Guarantee rollback for transaction failuresUsed when ACID properties are requiredIsolate state changes until committedCan set entire orchestration to atomic
Atomic Transaction
Debit Account A Credit Account B
Commit Commit
Creating Modular Business Processes
Invokes anotherorchestration asynchronouslyCalling orchestration continues processing
Start Orchestration
Invokes anotherorchestration synchronouslyCalling orchestration waits
Call Orchestration
Demonstration: Creating Transactions
In this demonstration, you will see how to:Set an orchestration as transactionalAdd a transactional scope toan orchestrationAdd an exception handler to a scope
Adding Compensation Code
Compensation code
Can be used for long-running or atomic transactionsReverses the effects of a transactionCalled after the transaction has been completedUses default compensation for nested transactions
Atomic Transaction
Commit
Credit Account A
Commit
Credit Account B
Compensation Code
Reverse Debit Reverse Credit
Demonstration: Adding Compensation Code
In this demonstration, you will see how to:Add a compensation block toa transaction
Lab: Creating Transactional Business Processes
Exercise 1: Adding Exception Handling to an Orchestration
Exercise 2: Adding Compensation to an Orchestration
Exercise 3: Calling CompensationExercise 4: Testing the Application