Support 3

It appear the GroupWise API limitation on file path length. In GroupWise client, I can add more then 200+ path length to a draft message but unable to do the same using the API. We will report this issue to Novell and post any update here. Btw, our test shows the maximum path length limit is 124.

In the meantime, you may need to copy the file to another location where the file path length will not exceed the maximum limit. You can use the Formativ Temporary directory (utilities.TempFiles) where the contents of this directory are cleared on GroupWise startup and shutdown. See the Formativ Language Guide for more information.

The code below copy a given file to the Formativ Temporary directory.


' Main line processing

Sub Main(Client, GWEvent)

  dim iNewPath

  '<< ....Your implementation of accessing message....>>

  if (len(iFilePath) > 123) then
    if CopyFileToFormativTempFolder(iFilePath, iNewPath) then
    end if
  end if

End Sub

' Copy a given file to the Formativ Temporary directory
function CopyFileToFormativTempFolder(aFilePath, byref aNewPath)

  CopyFileToFormativTempFolder = false
  aNewPath = ""

  if (len(aFilePath) = 0) then
    exit function
  end if

  aNewPath = utilities.AddBackSlashToPath(utilities.TempFiles) & utilities.ExtractFilenameFromPath(aFilePath)

  CopyFileToFormativTempFolder = Utilities.FileSystem.CopyFile(aFilePath, aNewPath, false)

end function

Advansys Support

[This message was edited by Support 3 on September 11, 2008 at 05:29 PM.]