Using JiGlue to Create a Session Object

This topic provides code samples in Visual Basic® and VBScript illustrating how to use the JiGlue COM Bridge to create a Process session (VWSession object). Note that all Process User Inbox, Step Processor, and Work Performer operations require that a Process session first be established.

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 information on data types, data type conversions between Java™ and COM, and using arrays, see the JiGlue COM Bridge Data Types topic.

The following Visual Basic and VBScript code samples illustrate how to dimension and create instances VWSession objects using the JiGlue.Util class (for additional information, see Using JiGlue.Util to Create a COM Object Representing a Java Object).

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 Process Java API methods or properties. For information on the Process Java API classes, their relationships, and calling sequences, see Process Java API Class Relationships.