WF 4.0 Base article (16) Compensableactivity compensation

Source: Internet
Author: User

This example illustrates

Compensableactivity compensation Container

Compensation allows the user to designate corrective action to be taken on activities that occur after successful completion of physical activity

Compensableactivity compensation Container

Class name System.Activities.Statements.CompensableActivity
File System.Activities.dll
Structure description Inherit nativeactivity<compensationtoken>

is a sealed class

Override [CacheMetadata method] and [Execute method] and [Cancel]

Override [Caninduceidle Property]

The [Variables] property is of type [Collection<variable>]

The type of the [body] property is [activity]

The [Cancellationhandler] property is of type [activity]

The [Compensationhandler] property is of type [activity]

The [Confirmationhandler] property is of type [activity]

The return value is System.Activities.Statements.CompensationToken

Function description You can define variables in [compensableactivity]

[Compensableactivity] is a compensation container, in [compensableactivity] the following four containers

[Body] container, subject

[Cancellationhandler] container, called when the [Cancel] behavior is generated

[Compensationhandler] container, called when an explicit call to [compensate] or process exception completes

[Confirmationhandler] container, called when [Confirm] is explicitly invoked or when the process completes normally

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.