HWSAdapterObject Interface

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)

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.SemiTrust Namespace