Using the COM Bridge

This topic provides samples of how to use the JiGlue COM Bridge to create a VWSession object and access content from an Image Services or Content Services library, as follows:

Note The JiGlue COM Bridge requires that elements of a Variant array be of a proper type, and they must be of the same type. For details on data types and using arrays, see the JiGlue COM Bridge Data Types topic.

Using the JiGlue COM Bridge to create a VWSession object

The following sample syntax demonstrates how to dimension and create an instances of JiGlue and VWSession objects in both Visual Basic and VBScript.

Note How you use the JiGlue COM Bridge to create a VWSession object depends on the development environment.

Visual Basic syntax:

dim objJiGlue As New JiGlue.JiGlueUtil
dim objVWSession As Object
Set objVWSession = objJiGlue.newInstance("filenet.vw.api.VWSession")

VBScript syntax:

dim objJiGlue, objsession
set objJiGlue = CreateObject("JiGlue.Util")
set objsession = objJiGlue.newInstance("filenet.vw.api.VWSession")

Once you create a VWSession object, you can access any of the methods or property in the eProcess APIs. For detailed reference information on the APIs, refer to the eProcess API JavaDoc documentation. The eProcess API documentation is HTML-formatted class information taken directly from the Java™ code (using the Sun Microsystems Javadoc utility). Refer to the Install Panagon eProcess Toolkit topic for more information on viewing the eProcess API JavaDoc documentation.

Using the JiGlue COM Bridge to Access an Image Services or Content Services Library

Important As of the current Panagon eProcess release, eProcess can, if desired, be set up without Content Services library access. For information on configuring eProcess without Content Services, refer to the WorkFlo Services Installation Handbook.

When accessing the content stored in either Image Services or Content Services libraries, you must first connect to the libraries using IDM Objects.

As an example, if you wanted to access attachments from a Content Services library or an Image Services library from an ASP file, you might include code similar to the following (the following code sample was taken from the sample launchStepElementInit.asp page and modified to make it easier to follow. For additional information, refer to the launchStepElementInit.asp file on the Web WorkFlo server):

Dim objLib, objDoc, vwAttachment, parts, objJiGlue

'Log on to the CS or IS library using the IDM Objects.

set objLib = Server.CreateObject("IDMObjects.Library")
objLib.LogonID = IDMWS_Library_GetLogonID(libraryName)
set objDoc = objLib.GetObject(Application("idmObjTypeDocument"),ObjectID)
docLabel = objDoc.Label
docVerNum = objDoc.Version.Number

'Create a eProcess VWAttachment object using the information retrieved
'from the CS or IS library.

set objJiGlue = CreateObject("JiGlue.Util")
set vwAttachment = objJiGlue.newInstance("filenet.vw.api.VWAttachment")
parts = Split(DocID, ":")
if (UBound(parts) >= 0) then
 vwAttachment.setType(CInt(parts(0)))
end if
if (UBound(parts) >= 1) then
  vwAttachment.setLibraryType(CInt(parts(1)))
end if
if (UBound(parts) >= 2) then
  vwAttachment.setLibraryName(parts(2))
end if
if (UBound(parts) >= 3) then
  vwAttachment.setId(parts(3))
end if
if (UBound(parts) >= 4) then
  Dim id
  id = parts(3) + ":" + parts(4)
  vwAttachment.setId(id)
  vwAttachment.setVersion(parts(4))
end if