This topic has not yet been rated - Rate this topic

HWSAdapterObject Interface (Microsoft.Office.Interop.InfoPath.SemiTrust)

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)
[CLSCompliantAttribute(false)] 
public interface HWSAdapterObject : HWSAdapter

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, see HWSAdapter.

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");
 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 + ".");
}
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.