Call agent.run is getting 'stuck'

i’ve got an archive dB, that sometimes the user will need to retrieve a document from. the retrieval document may have several children associated with it. when the user retrieves the document and sends it back to the original database i remove it permanently from the archive, send it back to the original, put it in a view and i run an agent to set the documents UNIDS.

More specifically, when the user clicks the retrieval button in the Archive dB it runs an agent that calls an agent in the original dB. This agent, lets call it ‘kickoff agent’, in the original database is triggered on event, Agent List Selection with a target of none and it calls another agent to set the unids. This agent, lets call it ‘Set UNIDs from view’ and this agent is is triggered on event, Action menu selection, with a target of all documents in view.

This process, using the view to set UNIDs, works fine in a different database, my problem is that when I call the ‘kickoff agent’ in the archive dB with the code below:

Set Agent = Db.GetAgent(“(Kickoff Agent)”)

Call Agent.Run

The Call Agent.Run gets stuck. It never completes the line of code. The original database is large, but I’m telling the agent to run only on documents in the view, and every time I set a UNID the documents fall out of the view because I am also setting a flag to remove the document from the view, so there are never mass amounts of documents in this view . . . can anyone tip me off as to what I may be doing wrong, this view and kickoff agent work while setting UNIDs for another process, so I know that this aspect works, but when I call the agent to run, it never finishes. Also, this works in my test databases, but not production. any hints would be appreciated.

Subject: call agent.run is getting ‘stuck’

As for the view, try setting view.autoupdate = false before working with items in the view (set it back to true when you are done).

Agent.run won’t return until the agent completes, so make sure you aren’t getting stuck in a loop.