ICheckinCmd::Initialize

CAUTION Customers should only use the ICheckinCmd2::Initialize2 method in new development, as well as replace existing implementations of the ICheckinCmd::Initialize method with ICheckinCmd2::Initialize2. The following information describes the method as it was defined in FileNet P8 3.0.0 and is provided for informational purposes only. FileNet does not support development with the ICheckinCmd::Initialize method in FileNet P8 3.5.0 or later.

The Initialize method is used to configure the Checkin operation, including providing the client with the ability to customize the dialog title. This method also enables the client to specify information about the item to be checked-in, such as the name and directory location of the file on the local machine, the version object for the item, the document class, and the XML for the item properties.

Records Management

When Records Manager is enabled for the Application Engine, the Initialize method can be used to specify whether the Declare Record operation should be made available for the specified object store. If the object store has the Records Manager feature enabled, and the bDeclareRecordOn parameter is set to VARIANT_TRUE, then the DeclareRecord button will be visible on the Confirmation page of the Checkin Wizard. The user can then click DeclareRecord to execute the Declare Record operation.

The Declare Record operation will be executed on every document represented by an ID in the vDocumentIDs parameter, including the checked-in document. If the vDocumentIDs parameter is empty, the operation will only be performed on the checked-in document. If the bDeclareRecordOn parameter is set to VARIANT_FALSE, the vDocumentIDs parameter will be ignored and the DeclareRecord button will not be visible.

NOTE When Records Manager is not enabled for the Application Engine or the object store does not have the Records Manager feature enabled, both the bDeclareRecordOn and vDocumentIDs parameters will be ignored. However, if Workplace determines that the Declare Record operation must be made available, then the DeclareRecord button will be visible, even if the Entry Template specifies that the Confirmation page should be hidden.

void spICheckinCmd->Initialize(_bstr_t bstrDialogTitle,
                               _bstr_t bstrPathName,
                               IObjectStoreItemPtr pIObjectStoreItem,
                               _bstr_t bstrRootDocClass,
                               VARIANT_BOOL bRestrictClass,
                               _bstr_t bstrPropertiesXml,
                               VARIANT_BOOL bDeclareRecordOn,
                               VARIANT vDocumentIDs);
Parameters
bstrDialogTitle - [in] Required _bstr_t, which specifies the label to display in the title bar of the Checkin Wizard dialog when the Checkin command is invoked. By using this parameter, client applications can customize the title that appears at the top of the Wizard dialog to correspond with their application requirements.
bstrPathName - [in] Required _bstr_t, which specifies the name and directory location of the file on the local machine that is to be checked-in.
pIObjectStoreItem - [in] Required pointer to an IObjectStoreItem interface, in which the version series ID (GUID) for the reservation object for the object to be checked-in is specified in the bstrVersionID parameter.
bstrRootDocClass - [in] Required _bstr_t, that specifies the root document class ID (GUID) to display and select for use by the Checkin operation, which can be set as follows:
- a GUID identifying the specific root document class.
- an empty string "" signifying that any class may be selected by the user.
bRestrictClass - [in] Required VARIANT_BOOL, which represents the class ID(s) that should be made available for selection and use by the Checkin operation. This parameter can be set to the following:
- VARIANT_TRUE, only allow the root document class ID specified in bstrRootDocClass to be selected.
- VARIANT_FALSE, allow the root document class ID specified in bstrRootDocClass or any of its' children to be selected.
NOTE When bstrRootDocClass is empty, only the base Document class may be selected, regardless of whether bRestrictClass has been set to true or false.
bstrPropertiesXml - [in] Required _bstr_t, the XML which specifies the properties to apply to the item during the Checkin operation, where the XML must be of the form:
<properties>
   <property>
      <symname>SymbolicName</symname>
      <values>
         <value>PropertyValue</value>
         <value>...</value></values>
   </property>
   <property>
      ...
   </property>
</properties>
bDeclareRecordOn - [in] Required VARIANT_BOOL, which represents whether the DeclareRecord button should be visible on the Confirmation page of the Checkin Wizard. This parameter can be set to the following:
- VARIANT_TRUE, the DeclareRecord button will be visible.
- VARIANT_FALSE, the DeclareRecord button will not be visible.
vDocumentIDs - [in] Required pointer to a VARIANT, which contains a SAFEARRAY of the IDs (GUIDs) for the documents which already exist in the specified object store. If the object store does not yet contain any documents, a value of VT_EMPTY should be specified. NOTE This parameter is ignored when the bDeclareRecordOn parameter is set to VARIANT_FALSE.
Results
This method always returns an HRESULT value of S_OK if successful.
Sample
For a demonstration of how to use the Checkin command in FileNet P8 3.5.0 or later, see the complete example for the command.