HWSAdapterObject interface

Office 2013 and later

Represents a connection to submit form information to a Microsoft Biztalk 2004 HWS (Human Workflow Services) server.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

<GuidAttribute("096cd6bf-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface HWSAdapterObject _
	Inherits HWSAdapter
Dim instance As HWSAdapterObject

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeHWSAdapter.

Use the Item property of the DataAdaptersCollection to return an HWSAdapterObject object.

In the following example, the Submit method of the HWSAdapterObject is used to start an HWS workflow. This example requires a data connection called "RespondToApproval":

HWSAdapter hwsAdapter = thisXDocument.DataAdapters["RespondToApproval"] as HWSAdapter;
if (hwsAdapter == null)
 thisXDocument.UI.Alert("HWSAdapter 'RespondToApproval' does not exist");
if (hwsAdapter.SubmitAllowed)
 catch (Exception ex)
  // The submit failed
  thisXDocument.UI.Alert("Submitting via adapter " + hwsAdapter.Name + "failed." + Environment.NewLine + "Reason: " + ex.Message);
 thisXDocument.UI.Alert("Submit is not allowed on adapter " + hwsAdapter.Name + ".");