Using JiGlue with ASP.NET - Issues and Guidelines

When developing a Process Open Client application, you must use JiGlue to provide the COM Bridge between the Data Providers and the Process Engine services (which are accessed via the Process Java APIs). The JiGlue COM Bridge provides the ability to make COM-based VB.NET (or other .NET-compatible language) calls to the Process Java APIs with the effect of native Java statements for nearly all Windows programming tasks.

Subtopics include:

JiGlue - ASP.NET Issues

There are a number of known ASP.NET and JiGlue COM Bridge-related issues and guidelines to keep in mind when creating your Process Open Client ASPX pages and User Controls, including:

will fail in some cases. If failure does occur, the symptoms and exceptions can be obscure.

Using JiGlue Example

For example, to use JiGlue to create and instantiate an Process VWSession object and logon, you might use VB.NET code similar to:

Imports Jiglue
Public Class FnJiglueSample
    Protected m_aJiglue As New JiglueUtil()
    Public Function Logon() As Boolean
    ...
      'Use JiGlue to create a VWSession object and logon
      Dim aVWSession As Object
      aVWSession  = m_aJiglue.newinstance("filenet.vw.api.VWSession")
      SetVWSession(aVWSession)
      aVWSession.logon(strUserName,strPassWord,strRouterURL)
    ...
    End Function
   ...
End Class

where strRouterURL is the URL of the Process Engine router.

Declaring Integer Arrays

If you are developing using both Java and VB.NET (for example, using JiGlue) and want to declare an integer array, be aware that in Visual Basic or VB.NET, an integer is a 16-bit value, whereas in Java (and for the Process APIs), an integer is a 32-bit value. If, for example, you specify a 2-byte integer array in Visual Basic, it might be mapped in JiGlue to java.lang.Short, thereby causing the Process Java API to throw an exception. For example, the following call to setDataFields will fail:

Dim integerArray(2)

integerArray(0)=10
integerArray(1)=20
integerArray(2)=30

wob.setFieldValue "integerArrayField", integerArray, false
dataFields = wob.getDataFields(127,1)
wob.setDataFields dataFields, false

However, if you change the array to 4-byte integers as follows, the call to setDataFields succeeds:

Dim integerArray(2)

integerArray(0)=CLng(10)
integerArray(1)=CLng(20)
integerArray(2)=CLng(30)

wob.setFieldValue "integerArrayField", integerArray, false
dataFields = wob.getDataFields(127,1)
wob.setDataFields dataFields, false

Tip Alternatively, you may wish to use the VB.NET Convert.ToInt32 Method (Int16) method, which converts the value of the specified 16-bit signed integer to an equivalent 32-bit signed integer.

Additional COM-related Issues

The following additional COM-related issues and guidelines should be kept in mind when developing a Process Open Client application:

For Additional Information

For additional information on developing with JiGlue and FileNet Open Client, also see: