Creating an agent using Lotus Script or Java

hi all,

i want to create (yes! the design element itself) an agent using lotus script or java.

is that possible?

the code that should be passed into the agent is available in text format.

background: a customer wants to create some kind of job agents. the code will always be the same. only difference are some selections and action rules for the documents this agent should something on.

in addition has each agent to be scheduled seperatley and should be started on its own.

so i think i need to create an agent for each job that should be scheduled.

any ideas?

tia

alex

Subject: RE: Creating an agent using Lotus Script or Java

Since the ‘code’ is the same, why not let the customer create some type of ‘selection’ or ‘schedule’ document that the agent reads. These docs would define the date the agent should process some set of docs and the collection that should be processed. I use this all the time and it works well. The agents run nightly, check to see if there is any work for that night and process the appropriate set of docs.

HTH

doug

Subject: RE: Creating an agent using Lotus Script or Java

hi,

thanks for your suggestions but i must start several agents at the same time.

so if i only have agent working on several sched docs, it will be serial. i need a parallel method.so i think the only way is to give the possibility to the admins (no common users) to create “job” agents on demand.

hope i explained it clearly enough :slight_smile:

Subject: RE: Creating an agent using Lotus Script or Java

Not clearer.

Unless I’m missing something, from the client, one user can run one agent at a time so there’s no way to run mulitple simultaneous agents. Multiple users could start the same agent at the same time and in this case the idea of a scheduling document still works; make the agent check to see who’s running th agent, then look for that user specific scheduler doc. I’d actually have the ‘schedule’ doc initiate the agent - fill in the form to define what is to be worked on then have a button run the code. This way each person starting the agent (same code) runs on different document sets.

I think scheduled agents also run in series.

If I’m still not getting the problem, can you provide a bit more detail on what you’re trying to accomplish?

Doug

Subject: RE: Creating an agent using Lotus Script or Java

hm as far as i know there is a setting called “Max concurrent agents” where the count can be defined.

i want to run those agents concurrently.

the requirements are:

customer can create new agent without opening the designer and will enter a selection formula (used by the agent within a dbsearch) and some other information like schedule time etc. code of this agent will be generated by my code :slight_smile:

got it?

Subject: RE: Creating an agent using Lotus Script or Java

OK, I’ll give you the cuncurrent agent setting but you don’t manage the agent manager so there is no way you can make the system run specific agents at specific times so there is no guarantee you can get the set of agents you want run concurrently acutally running at the same time. I don’t get into this level of detail so I may be wrong here also but Julie K has published a number of wonderful articles on agent managment (see the FAQs) and those would be great places to get info from the goddess of all agents.

No, I still don’t get it…why do you need to run these things at the same time? What (specifically) are you trying to do with these agents? The reason I’m asking is that with some knowledge of your end objective (not concurrent user created agents but ‘I have a db of parts that needs to be updated with blah blah information derived from xyz source yada yada ya’), it may be possible to suggest alternative ways to get where you want to go. I’m interested in the goal, not your currently design choice. Does that make sense?

I’m just now getting into R6. In older version, there was no real way to create an agent (or form or view or any other design element) on the fly. There may be something in the DXL system that might allow you to create agents on the fly. I’d suggest you search on that.

There is/was a db in the Sandbox that showed how to create a view of design elements and provided some information on how to interact with them.

Doug

Subject: RE: Creating an agent using Lotus Script or Java

Unless things have changed, the max concurrent agents setting still does not allow more than one agent to execute simultaneously within one database, so you’d have to create separate databases for each agent.

If I really needed concurrency and configurability as you describe, a single multi-threaded Java agent with a thread dispatcher controlled by configuration documents is probably the way I’d go.