How do I create my own Agent in Livelink
Did you ever wonder who sends all those email notification when any action is performed in Livelink about which you would like to get notified or do those workflow steps that no other users want to perform....Think Think...
The answer is simple..
There are some agent quietly running in background, some of which are responsible to send those notification emails or doing those workflow steps :)
Now, can we write our own Livelink Agent? - Yes, we can and it quite easy too..
And those easy steps are
Vote of thanks to Siva Thanneru, friend and ex-team mate who wrote the first agent for my project :)
Did you ever wonder who sends all those email notification when any action is performed in Livelink about which you would like to get notified or do those workflow steps that no other users want to perform....Think Think...
The answer is simple..
There are some agent quietly running in background, some of which are responsible to send those notification emails or doing those workflow steps :)
Now, can we write our own Livelink Agent? - Yes, we can and it quite easy too..
And those easy steps are
- Orphan the node LLAgent:Agent node in your custom module
- Create a child node and give it a fancy name (say myFirstAgent)
- Give it a Id. Override the fAgentID (This id goes into your agentschedule table and should be a value above 9999)
- Enable it my setting fEnabled to true
- And put the code that you want to run in the Execute method.
- Do entry in AgentSchedule table with Enable set to true and other details.
You also make a custom admin page to set the bitmask and enter the values in the agentschedule table. According to the bitmask the agent will run on a periodic basis.
For testing purpose, you can run the agent using a simple URL http://hostname/livelink/livelink.exe?func=agent.runagent&agent_list={'id1','id2'}
Just make sure that RunWithoutLogin is set to true in your ini file before trying the above URL.
Hope I made sense :)
Vote of thanks to Siva Thanneru, friend and ex-team mate who wrote the first agent for my project :)
Hello Rinita,
ReplyDeleteYour post is being truly helpful,
I managed to create the Agent and the test was OK,
but I cannot see it in my "Configure Scheduled Activities"
This is what the "custom admin page" is for?
If so, I could use some sample from the OOB agents?
Best regards
Thanks Joao,
ReplyDeleteTo configure the schedule thr are two ways.
Let me put down the easiest way here
1. Orphan WebAgent --> WebAgent Objects --> ScheduleActivitiesConfig and give it a name
2. Set fEnabled = true
3. Set fAgentId = set id which you used to create your agent..
4. Set fName = Give a name you want to show as header for your agent under
Admin page --> Notification configuration -->Configure Scheduled Activities
5. Build your ospace, save and restart it
Go to http://livelink/Livelink/livelink.exe?func=agent.ConfigScheduledActivities to enable\disable and configure the schedule...
The second way would be to create an admin section for your custom module and put an custom html to do it...
Maybe this https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=7633419 will be helpful.....