Notes email attachment to IFS Agent?
120 pts.
0
Q:
Notes email attachment to IFS Agent?
Is there a class, or function of some kind that can be used to authenticate against an AS400 IFS using lotus Script.


Software/Hardware used:
Domino 8.0.2 on iSeries V5R4
ASKED: Sep 15 2009  10:41 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
120 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
If i have well understood, your Domino server is running on the iSeries ... Right ?
So you don't need authentification to acces IFS !

Different iSeries Box, Domino on one, and my target IFS on another.


But I should be able to do it anyway... just can't figure out how...
Last Answered: Sep 17 2009  10:35 PM GMT by Hdwest61   120 pts.
Latest Contributors: BruceWayne   1600 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

BruceWayne   1600 pts.  |   Sep 18 2009  10:03AM GMT

Well i think you should first create a share forlder on the remote iSeries, then autorize the QNOTES profile to acess, read, write files then acces from one iSeries (where you have your Domino running) with an UNC link link \My_Distant_iSerieMy_IFS_ShareFolder
Did you try that ?

 

BruceWayne   1600 pts.  |   Sep 18 2009  11:27AM GMT

You should read for UNC convention

\My_Distant_iSerieMy_IFS_ShareFolder

 

BruceWayne   1600 pts.  |   Sep 18 2009  11:28AM GMT

This editor sucks !

\\My_Distant_iSeries\My_IFS_ShareFolder

 

Hdwest61   120 pts.  |   Sep 18 2009  12:15PM GMT

This is what I get when I try to UNC to the share:

09/18/2009 07:10:34 AMgr: Start executing agent ‘Move Attachments | MovFiles’ in ‘mail/mailboxname.nsf’ by Executive ‘2′

09/18/2009 07:10:34 AMgr: ‘Hartland West/dupre’ is the agent signer of agent ‘Move Attachments | MovFiles’ in ‘mail/mailboxname.nsf’

09/18/2009 07:10:34 AMgr: ‘Agent ‘Move Attachments | MovFiles’ in ‘mail/mailboxname.nsf’ will run on behalf of ‘Hartland West/dupre’

09/18/2009 07:10:34 AMgr: Agent (’Move Attachments | MovFiles’ in ‘mail/mailboxname.nsf’) error message: Error creating product object

 

BruceWayne   1600 pts.  |   Sep 22 2009  6:27AM GMT

Does “Hartland West/dupre” have the correct rights set up to acces ?
On which line of your code the “Error creating product object” happens ?

 

Hdwest61   120 pts.  |   Sep 23 2009  12:05PM GMT

As it turns out… all of the original work was centered on this process running as an action item. Therefore there was the need for the “NotesUIWorkspace ” object.

Even though the in the Agent version, the processes using that object were removed, they were still there in the declaration, and the object was being set.

Once I removed that, it worked as expected.

Here’s what I ended up with as a working Agent:

Dim sDir As String
Dim s As NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument

Sub Initialize

Set s = New NotesSession
Set db = s.CurrentDatabase
Set dc = db.UnprocessedDocuments
Set doc = dc.GetFirstDocument

Dim rtItem As NotesRichTextItem
Dim RTNames List As String
Dim DOCNames List As String
Dim itemCount As Integer
Dim sDefaultFolder As String
Dim x As Integer
Dim vtDir As Variant
Dim iCount As Integer
Dim j As Integer
Dim lngExportedCount As Long
Dim attachmentObject As Variant

sDir = “/Local_IFS/Folder”

‘ Msgbox sDir

While Not ( doc Is Nothing )

iCount = 0
itemCount = 0
lngExportedCount = 0
Erase RTNames
Erase DocNames

‘Scan all items in document
Forall i In doc.Items

If i.Type = RICHTEXT Then
Set rtItem = doc.GetfirstItem <a href="http://i.Name" title="http://i.(" target="_blank">i.Name</a>)
If Not Isempty(rtItem.EmbeddedObjects) Then
RTNames(itemCount) = Cstr <a href="http://i.Name" title="http://i.(" target="_blank">i.Name</a>)
itemCount = itemCount + 1
End If
End If

End Forall

For j = 0 To itemCount - 1
Set rtItem = Nothing
Set rtItem = doc.GetfirstItem(RTNames(j))
Forall Obj In rtItem.EmbeddedObjects
If (Obj.Type = EMBED_ATTACHMENT) Then
Call ExportAttachment(Obj)
Call Obj.Remove
Call doc.Save(False, True)
‘creates conflict doc if conflict exists
End If
End Forall
Next

‘Scan all items in document
Forall i In doc.Items

If i.Type = ATTACHMENT Then
DOCNames(lngExportedCount) = i.Values(0)
lngExportedCount = lngExportedCount + 1

End If

End Forall

For j% = 0 To lngExportedCount -1
Set attachmentObject = Nothing
Set attachmentObject = doc.GetAttachment(DOCNames(j% ))
Call ExportAttachment(attachmentObject)
Call attachmentObject.Remove
Call doc.Save(False, True)
‘creates conflict doc if conflict exists
Next

Set doc = dc.GetNextDocument(doc)
Wend

Msgbox “Export Complete.”, 16, “Finished”

End Sub

Sub ExportAttachment(o As Variant)

Dim sAttachmentName As String
Dim sNum As String
Dim sTemp As String

sAttachmentName = sDir & “/” & o.Source
Print “The filename path is ” & sAttachmentName

While Not (Dir$ (sAttachmentName, 0 ) = “” )
sNum = Right (Strleftback(sAttachmentName, “.”), 2)
If Isnumeric(sNum) Then
sTemp = Strleftback(sAttachmentName, “.”)
sTemp = Left(sTemp, Len(sTemp) - 2)
sAttachmentName = sTemp & Format$ ( Cint (sNum) + 1, “##00″ ) & “.” & Strrightback(sAttachmentName, “.”)
Else
sAttachmentName = Strleftback(sAttachmentName, “.”) & “01.” & Strrightback(sAttachmentName, “.”)
End If
Wend

Print “Exporting ” & sAttachmentName
‘Save the file
Call o.ExtractFile( sAttachmentName )

End Sub

 

BruceWayne   1600 pts.  |   Sep 25 2009  7:12AM GMT

Pretty cool ! Good job.

 
0