Search DominoPower's 11,428 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Control your application's agents with this Agent Launchers tool (continued)

In addition to this basic functionality, I often find it useful to specify which users can use which agents. As I mentioned before, using the launcher agent in combination with the agent list setting allows the developer or administrator to modify or remove any agent in this list without making a design change. One possible use for this might be to hide miscellaneous development/testing agents once the application has been tested and moved into production.

Still, instead of completely hiding the various agents used during development, you might find it useful to only hide them from non-developers. To do this, you would need to create a "[developer]" role and maintain a separate list of the agents that only developers can run. For that matter, creating an "[admin]" role and agent list might also be a good idea.

If this level of security is necessary for a given application, the launcher agent can optionally support the "[developer]" and "[admin]" roles and agent lists. After getting the standard list of available agents from the ManualLaunchList setting, it also checks whether the user has the "[developer]" or "[admin]" roles; if so, it gets the corresponding agent lists and appends them to the standard list.

REM "Allows an user to launch an agent manually (e.g. a scheduled agent or one that cannot be launched from the actions menu).";
REM "This tool requires the Agents*ManualLaunchList setting. It optionally also uses the [admin] and [developer] roles, and their respective lists.";

REM "Get the standard list of agents";
errmsg := "ERROR: Please notify the database owner that this lookup failed.";
choicelist := @DbLookup( "" : "NoCache"; "" ; "vwLookSettings" ; "Agents*ManualLaunchList" ; "fValues" );
@If(
@IsError(choicelist);
@Do(
@Prompt([OK]; "Error"; errmsg);
@Return("")
);
""
);

REM "Get the admin and/or developer lists of agents, if the user has access and they exist.";
roles := @LowerCase (@UserRoles);
choicelistadmin := @If(
@IsMember("[admin]"; roles);
@DbLookup( "" : "NoCache"; "" ; "vwLookSettings" ; "Agents*ManualLaunchListAdmin" ; "fValues" );
""
);
choicelistdev := @If(
@IsMember("[developer]"; roles);
@DbLookup( "" : "NoCache"; "" ; "vwLookSettings" ; "Agents*ManualLaunchListDev" ; "fValues" );
""
);

REM "Concatenate the lists of agents, removing blanks and duplicates. Split out the names and aliases.";
choicelistall := @Trim ( @Unique(
choicelist :
@If (@IsError(choicelistadmin); ""; choicelistadmin) :
@If (@IsError(choicelistdev); ""; choicelistdev)
) );
namelist := @Left( choicelistall; "|" );
aliaslist := @Right( choicelistall; "|" );

REM "Get user selection";
namechoice := @Prompt([OKCANCELLIST]:[NoSort]; "Select Agent"; ""; @Subset(namelist; 1); namelist);
@If(
namechoice = "";
@Return("");
""
);

REM "Get the corresponding alias and launch it";
pos := @Member (namechoice; namelist);
aliaschoice := @Subset ( @Subset (aliaslist; pos); -1);
@Command([ToolsRunMacro]; aliaschoice)


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  6  ·  7  ·  Next »
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
IBM Lotus to Google Apps Migration Remorse
Webcast Series: Mobile Collaboration with Lotus Software
Domino Login Control for Mobile Apps
Quickr place Superusers
Writing Client-Side Javascript for Re-Use
Lotus Notes R8.5.1: Bug in Contacts "Print Selected View"
New Notes/Domino Technotes published about Chile's extended daylight saving time
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login