Edytuj

Udostępnij za pośrednictwem


HWSAdapterObject Interface

Definition

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

public interface class HWSAdapterObject : Microsoft::Office::Interop::InfoPath::HWSAdapter
[System.Runtime.InteropServices.Guid("096CD6BF-0786-11D1-95FA-0080C78EE3BB")]
public interface HWSAdapterObject : Microsoft.Office.Interop.InfoPath.HWSAdapter
type HWSAdapterObject = interface
    interface HWSAdapter
Public Interface HWSAdapterObject
Implements HWSAdapter
Derived
Attributes
Implements

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":

<span class="label">HWSAdapter</span> hwsAdapter = thisXDocument.DataAdapters["RespondToApproval"] as <span class="label">HWSAdapter</span>;
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 + ".");
}

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.

Properties

Name

Returns the name of an HWSAdapterObject object.

(Inherited from HWSAdapter)
QueryAllowed

Returns a value that is always false, corresponding to the queryAllowed attribute in the form definition file (.xsf).

(Inherited from HWSAdapter)
SubmitAllowed

Returns a value that is always true, corresponding to the submitAllowed attribute in the form definition file (.xsf).

(Inherited from HWSAdapter)

Methods

Query()

The Query method is available for the HWSAdapterObject but, because the HWSAdapter object is available for submitting data only, the method will always generate a run-time error when it is called on that object.

(Inherited from HWSAdapter)
Submit()

Executes the submit operation for the associated adapter.

(Inherited from HWSAdapter)

Applies to