Call WCF in the reimbursement multilevel approval workflow in asp.net

Source: Internet
Author: User

This article I put WF on data processing operations completely to WCF processing, WF only care about the process design processing, as to the underlying data how to operate does not need to care. This reduces the degree of coupling between applications in a large program.

Sendactivity: Client activity, used to simulate a synchronous invocation of a WCF service operation.

You can use Sendactivity to complete a call to WCF in WF, not in the traditional way, Sir, into a WCF code, and then call the appropriate method. In the project we trigger external events by "handleexternalevent activity", write the relevant business logic code in the event, and feel a high degree of coupling, because WF not only wants to design workflows, but also needs to deal with the database.

Solution: Add a sendactivity after the handleexternalevent activity, at which point the HandleExternalEvent event's only function is to assign a value to the sendactivity parameter. As there are more states in the project, I show the activity diagram of the employee status:

 

Sendactivity property setting:

The ChannelToken used by 1:channeltoken:sendactivity to establish its own association with the client channel.

2:name: Gets or sets the name of this instance. This name must conform to the variable naming rules for the programming language used in the workflow project.

3:endpointname: A endpoint used to communicate with a service.

4:SERVICEOPERATIONINFO:WCF Service interface.

5:owneractivityname: The name of the associated activity.

6:parameters: The parameter in the method. This parameter requires background code support, which is divided into two steps:

Related Article

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.