FileNet Web Services Files Referenced By Process Applications

Most of the ASP files you create for Process applications (such as Step Processors) using the FileNet Web Services web application may need to reference some or all the FileNet Web Services ASP and JavaScript files in the <drive>...\Program Files\FileNet\IDM\Web\IDMWS\WSCAPI directory on the FileNet Web Services server. Normally, you should not need or wish to modify any of these files. Among these, it is important to note that remote scripting must be enabled in order for your application to access the client-side API objects (see EnableRemoteObject.asp below).

This topic describes these files and provides example code illustrating how to reference these files. Subtopics include:

FileNet Web Services Files Referenced By Process Applications

This table lists the FileNet Web Services files that are normally referenced by Process applications and briefly describes each file. If the FileNet Web Services file has been modified for PJAC (to support Process Engine connectivity) during installation, that fact is also indicated.

Referenced file

Description

InitApplication.asp

Reference this file in top level ASP pages only. This file is used to initialize the application by implementing session-related variables and constants used by FileNet Web Services and by setting the cookie states.

InitPage.js

Reference this file in each ASP in your application. This JavaScript initializes the ASP by implementing page-related variables and constants.

EnableRemoteObject.asp

Enables remote scripting by calling the Microsoft remote scripting libraries in the ...\Program Files\FileNet\IDM\Web\IDMWS \_ScriptLibrary directory (for information, see Process Services Directory Structure - FileNet Web Services). Remote scripting must be enabled to make method calls on the client-side Javascript API objects (used in both FileNet Web Services and PJAC for FileNet Web Services ASP pages). For an example, see Example Code for Referencing FileNet Web Services Files below.

PopupManager.js

Provides functions for handling popup windows.

Misc.js

Provides the ability to use the FileNet Web Services utility functions.

Document.js

Modified for PJAC for FileNet Web Services. Provides the ability to create an IDMWSC_Document object and use methods supported by the object.

Event.js

Provides the ability to create an IDMWSC_Event object and propagate events.

Folder.js

Provides the ability to create an IDMWSC_Folder object and use methods supported by the object.

Library.js

Modified for PJAC for FileNet Web Services. Provides the ability to create an IDMWSC_Library object and use methods supported by the object.

Result.js

Provides the ability to create an IDMWSC_Result object and use the methods and access properties supported by the object.

StoredSearch.js

Provides the ability to create an IDMWSC_StoredSearch object and use the methods supported by the object.

Version.js

Provides the ability to create an IDMWSC_Version object and use the methods supported by the object.

 

Example Code for Referencing FileNet Web Services Files

The sample code lines below illustrate which FileNet Web Services files to reference in your application ASPs and how to reference them. To reference these files, include the following lines in the approximate order shown. You should place the line referencing the InitApplication.asp in your application's top level ASP only, as follows:

<script language="Javascript" src="WSCAPI/InitApplication.asp"></script>
<script language="Javascript" src="WSCAPI/InitPage.js"></script>

The lines referencing the Javascript objects can be included in any order, but you normally list them in the order the object is most likely to be used. In general, you should include only the .JS files associated with the objects you create in a given page. For example:

<script language="Javascript" src="Redist/PopupManager/PopupManager.js"></script>
<script language="Javascript" src="WSCAPI/Library.js"></script>
<script language="Javascript" src="WSCAPI/Folder.js"></script>
<script language="Javascript" src="WSCAPI/Document.js"></script>
<script language="Javascript" src="WSCAPI/Event.js"></script>
<script language="Javascript" src="WSCAPI/Result.js"></script>
<script language="Javascript" src="WSCAPI/Misc.js"></script>

During web application operation, the referenced JavaScript library files are cached on the client system, so including all of the .JS files in every application ASP impacts performance only during the first page request. After the files are cached in local cache, all calls to the .JS files are handled by the locally cached copies, thereby minimizing performance impact.

Important Note You must use remote scripting to access the client-side API objects. To enable remote scripting, be sure to include the following line in each application ASP:

<!-- #INCLUDE FILE="../WSCAPI/EnableRemoteObject.asp"-->