次の方法で共有


Generating Communication Activities

The workflow communication activity generator command-line utility, Wca.exe, is used to generate strictly bound communications activities from a compiled ExternalDataExchange interface. Whereas the HandleExternalEventActivity and CallExternalMethodActivity activities can both be used directly to handle generic communications in a workflow, the ExternalDataExchange interface strictly bound derived activities provide a better designer experience. These activities improve performance by removing the use of reflection and easing customization for frequently used ExternalDataExchange interfaces.

For each operation on the ExternalDataExchange interfaces in the input assembly, Wca.exe generates code for the corresponding activity. Events on the interface become derivatives of HandleExternalEventActivity, and methods become derivatives of CallExternalMethodActivity.

The Wca.exe tool provides the command-line parameters /collapseArgs and /includeSender to determine how the HandleExternalEventActivity subclass properties appear. The /collapseArgs parameter causes a single E property of the EventArgs type to be generated instead of the default, which generates one property on the activity for each public property and field of the EventArgs. The /includeSender parameter includes a Sender property on the activity of type object, which is populated by the sender parameter of the event handler.

The output files of the Wca.exe tool can be compiled, without editing, to create strictly bound activities that are ready to use. The output files can be set to either the C# or the Visual Basic language by the /language command-line parameter. For a full list of available options, run Wca.exe with the /? parameter, for example C:\wca.exe /?.

See Also

Reference

HandleExternalEventActivity
CallExternalMethodActivity

Concepts

Using the HandleExternalEventActivity Activity
Using the CallExternalMethodActivity Activity
Creating Custom Communication Activities
Windows Workflow Foundation and Application Communication

Other Resources

Communications Samples