Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Lotus Workflow Forum

Lotus Workflow Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

RE: Re: Automated Agent Stop Working
Gabriel Santos Taibo 5.Nov.09 12:23 PM a Web browser
Lotus Workflow Engine 3.0 Windows 2003



Hi,

Did you check the view errorlog, for see if some error is happening.

I will check as well the view used by the Workflow agent:
(OSServerQueue) to see if you document are in this view, if not they wont be proccessed by the agent.

And if you need to enable debug :

you will need to add some code to the Script Library "OS Application Events:

====================================================================

Private Function PostWFSessionCreate_( objWFSession As WFSession )
'create document and put this into cache for futher use
Dim doc As NotesDocument
Dim RTF As Notesrichtextitem
Dim ErrorCode As Integer
Dim ErrorText As String
If objWFSession.Session.isOnServer Then
'create document
Set doc = New NotesDocument ( objWFSession.ApplicationDatabase )
Call doc.ReplaceItemValue("Form", "OS Log" )
Call doc.ReplaceItemValue("Subject", "Running : " & objWFSession.Session.CurrentAgent.Name)
Call doc.ReplaceItemValue("UserName", objWFSession.Session.UserName )
Call doc.ReplaceItemValue("EffectiveUserName", objWFSession.Session.EffectiveUserName )
Call doc.ReplaceItemValue("WorkflowUserName", objWFSession.UserName )

'create log RTF field and initialize it
Set RTF = New Notesrichtextitem( doc, "Body")
Call rtf.AppendText("Initializing log : " & Format$( Now, "Short Date") & " - " & Format$(Now, "Short Time"))
Call rtf.addnewline(2)

'save doc
Call doc.save(True, True)

'add doc to global cache
If Not DWFUtilSetGlobalObject( "InternalLog", doc , Errorcode, ErrorText) Then
Messagebox "Error initializing log document -> " & Str$(ErrorCode) & " - " & ErrorText
End If

End If
End Function

===============================================================================================================

Private Function OnDebugPrint_(Byval strModule As String, vMsg As Variant, nContinue As Integer)
'create document and put this into cache for futher use
Dim doc As NotesDocument
Dim rtf As Variant
Dim ErrorCode As Integer
Dim ErrorText As String
Dim str1 As String, str2 As String, strMsg As String

Const c1 = 35
Const c2 = 70

On Error Goto ErrorHandler

If gWFSession.Session.IsOnServer Then
str1 = String(c1, " ")
str2 = String(c2, " ")

strMsg = "[" & gWFSession.Session.CommonUserName & "] " & Format$( Now, "Short Date") & " - " & Format$( Now, "Short Time")
strMsg = Left$(strMsg & str1, c1)
strMsg = Left$(strMsg & strModule & str2, c2)

'get log document
If Not DWFUtilGetGlobalObject( "InternalLog", doc , Errorcode, ErrorText) Then
Messagebox "Error getting document -> " & Str$(ErrorCode) & " - " & ErrorText
End If

If Not doc Is Nothing Then
'here we can log the text passed
Set RTF = doc.GetFirstItem("Body")
If RTF Is Nothing Then
Set RTF = New Notesrichtextitem( doc, "Body")
End If

'print the message
If Isarray(vMsg) Then ' Print them all !
Call rtf.addnewline(1)
'Call rtf.AppendText( Format$( Now, "Short Date") & " - " & Format$( Now, "Short Time") )
'Call rtf.addtab( 1 )
'Call rtf.AppendText( strModule )
'Call rtf.addtab( 1 )
Call rtf.AppendText( strMsg & "[...array content follows...]" )

Forall Msg In vMsg
Call rtf.addnewline(1)
'Call rtf.AppendText( Format$( Now, "Short Date") & " - " & Format$( Now, "Short Time") )
'Call rtf.addtab( 1 )
'Call rtf.AppendText( strModule )
'Call rtf.addtab( 1 )
Call rtf.AppendText( strMsg & Msg )
End Forall

Else ' Just a string...
Call rtf.addnewline(1)
'Call rtf.AppendText( Format$( Now, "Short Date") & " - " & Format$( Now, "Short Time") )
'Call rtf.addtab( 1 )
'Call rtf.AppendText( strModule )
'Call rtf.addtab( 1 )
Call rtf.AppendText( strMsg & vMsg )
End If

Call doc.Save(True, False)
End If
End If
Exit Function
ErrorHandler:
Err = 0
Exit Function
End Function

after of this you will need to create a form (forn mane=(OS Log) | Os Log) with the following fields:

body (richtext) no formula, editable
UserName (text) formula=FromOS, computed for display
EffectiveUserName (text) formula=FromAgentOS, computed for display
WorkflowUserName(text) formula=SendtoOS, computed for display
Subject (text) no formula, editable

and you need to create a view as well:
view name =Os Log
formula=SELECT form="OS Log"
feel fre to customize by your own the columns.

Regards
Gabriel







Automated Agent Stop Working (Huei Huei Chong... 3.Nov.09)
. . Re: Automated Agent Stop Working (Thorsten Seidel... 4.Nov.09)
. . . . RE: Re: Automated Agent Stop Workin... (Huei Huei Chong... 4.Nov.09)
. . . . . . RE: Re: Automated Agent Stop Workin... (Gabriel Santos ... 5.Nov.09)
. . . . . . . . RE: Re: Automated Agent Stop Workin... (Sharjeel Siddiq... 15.Nov.09)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow