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: