Share via


HWSAdapterObject interface

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

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

Syntax

'Declaration
<GuidAttribute("096CD6BF-0786-11D1-95FA-0080C78EE3BB")> _
Public Interface HWSAdapterObject _
    Inherits HWSAdapter
'Usage
Dim instance As HWSAdapterObject
[GuidAttribute("096CD6BF-0786-11D1-95FA-0080C78EE3BB")]
public interface HWSAdapterObject : HWSAdapter

Remarks

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.

Examples

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");
 return;
}
if (hwsAdapter.SubmitAllowed)
{
 try
 {
  hwsAdapter.Submit();
 }
 catch (Exception ex)
 {
  // The submit failed
  thisXDocument.UI.Alert("Submitting via adapter " + hwsAdapter.Name + "failed." + Environment.NewLine + "Reason: " + ex.Message);
 }
}
else
{
 thisXDocument.UI.Alert("Submit is not allowed on adapter " + hwsAdapter.Name + ".");
}

See also

Reference

HWSAdapterObject members

Microsoft.Office.Interop.InfoPath namespace