Every Application Integration command supported by the FileNet® Workplace Application Integration Toolkit, such as Download or Open, is represented by a pair of unique, in-process COM Servers, one for the command component and another for its response component. The command component is used to instantiate and initialize the command and to invoke it upon an Application Integration session. Every time a command is executed, a newly instantiated response component is returned.
The Toolkit provides COM interfaces to support client application interaction with the command and response components. Every command automatically uses the IAppIntCmd interface and its' relevant methods to support command execution, as well as the IAppIntRsp interface to capture standard response data. In addition, each command may also use one or more optional interfaces that provide functionality specific for that command, such as IDownloadRsp or IOpenRsp.
In order to execute a command and handle the response, the client application must:
NOTE The client application should always inspect the response data to determine if the command succeeded, before attempting to invoke any methods on interfaces used by the response component. For more information, see the following section Detecting and Interpreting Response Errors.
Each time an invoked command is executed, an interface pointer to a newly instantiated response component is returned. Even when command execution fails, a valid IAppIntRsp interface pointer for the response component is returned by the invoke operation. In certain cases, the response component may contain information about the error and the client application may extract this data using the IAppIntRsp interface methods, as depicted in the following code fragment:
// Get the IAppIntRsp HRESULT and determine if the command failed. HRESULT hResult = spIAppIntRsp->GetHResult(); std::cout << "HRESULT=0x" << std::hex << hResult << std::dec << std::endl; if (FAILED(hResult)) { // The Command Failed - get information about the failure. _bstr_t errorName = spIAppIntRsp->GetErrorName(); std::cout << "ErrorName=" << ( errorName.length() ? (LPCSTR) errorName : _T( "" ) ) << std::endl; _bstr_t errorMsg = spIAppIntRsp->GetErrorMsg(); std::cout << "ErrorMsg=" << ( errorMsg.length() ? (LPCSTR) errorMsg : _T( "" ) ) << std::endl; _bstr_t errorDetails = spIAppIntRsp->GetErrorDetails(); std::cout << "errorDetails=" << ( errorDetails.length() ? (LPCSTR) errorDetails : _T( "" ) ) << std::endl; }
All command component COM interfaces are named I<command name>Cmd. All response component COM interfaces are named I<command name>Rsp. For example:
Download | Command name |
IDownloadCmd | Command component interface |
IDownloadRsp | Response component interface |
The following table describes the currently supported FileNet Application Integration commands and identifies whether each command is invoked with an interactive graphical user interface, or silently and without any visual representation. When the invoked command is visible, the Workplace functionality that corresponds to the command is described.
CAUTION Only the methods discussed in this help document are guaranteed to be supported. Therefore, we recommend that you not use any undocumented members of an interface, as they may be subject to change and/or removal in future releases.
Command | Invocation | Description |
---|---|---|
Add | Interactive / Wizard dialog |
Launches the Add Wizard to add a file on the local machine to an object store. |
AddFolder | Interactive / Wizard dialog |
Launches the Add Folder Wizard to add a folder to an object store. |
AddViaTemplate | Interactive / Wizard dialog |
Launches the Add Via Template Wizard to add a file on the local machine to an object store, using a pre-defined entry template. |
CancelCheckout | Silent / Invisible | Silently cancels the checkout operation for a specified object store item. |
Interactive / Wizard dialog |
Launches the Checkin Wizard, which guides the user through the process of checking an item into an object store. |
|
CheckoutList | Interactive / Java™Server Pages (JSP) page | Displays the Checkout List JSP page, from which a user can choose from a list of currently checked-out items filtered by MIME type. |
Download | Silent / Invisible | Silently downloads a specific version of an object store item and saves it to a specified file on the local machine. |
Silent / Invisible |
Silently determines if a specified object store item is checked-out by the current user. |
|
GetPreferences | Silent / Invisible | Silently retrieves the site, user, or bootstrap preferences from the application server. |
Open | Interactive / JSP page | Displays the Select Item (Open) JSP pages to enable the user to select a particular version of an object store item to be downloaded (open) or checked-out and downloaded. |
Silent / Invisible |
Enables the user to quickly checkin an item into an object store without using the Checkin Wizard. |
|
SelectEntryTemplate | Interactive / JSP page | Displays the Select Entry Template Page to enable the user to choose an entry template from a filtered list of choices. |
Interactive / JSP page |
Displays the Select Item JSP pages to enable the user to select a particular version of an object store item. |
|
SelectProperties | Interactive / JSP page |
Displays the Select Properties JSP pages to enable the user to select properties associated with a document item or class and then retrieve those values to be embedded in document content. |
ShowProperties | Interactive / JSP page | Displays the Properties JSP page, which presents the current item and system properties for an object store item to the user. |
Tasks | Interactive / JSP page | Displays the Tasks JSP page, which presents a Tasks queue to the user. |
Transport | Silent / Invisible | Performs one of these functions: adds a document, checks in a document, or saves content. This command utilizes the IServletParameter interface to specify parameters for the function. |
Upload | Silent / Invisible | Silently uploads a specific object store item from a specified file on the local machine. This command utilizes the IObjectStoreItem interface to encapsulate the object store item to upload. |