Running StarTeam Notification Agent

If you choose to, you can run StarTeam Notification Agent 365 days a year, 24-7. If you stop StarTeam Notification Agent and restart, it starts processing the notification tasks it missed while it was shut down. Each instance of StarTeam Notification Agent monitors one server configuration.

You can run StarTeam Notification Agent manually or as a service.

Running StarTeam Notification Agent Manually

Notification Agent and Notification Agent Setup are separate, but similar looking applications. To run StarTeam Notification Agent manually:

  1. Click Start > Programs > Micro Focus > StarTeam Notification Agent > Agent. The Notification Agent window opens, displaying a list of server configurations, one for each .nac file you created as you added server configurations using Notification Agent Setup.
  2. Select a configuration.
  3. Click Start Agent. After the agent starts, the button text changes to Shut Down and the word Running appears beside the configuration’s name.

If you use Notification Agent Setup to change the information in a server configurations .nac file, you can update Notification Agent by clicking the Refresh button.

To test notification and workflow processes, you can use the Run Now button. Clicking Run Now moves an item to the next workflow step regardless of notification times. For example, suppose that StarTeam Notification Agent has just notified the first participant that an item needs attention. Clicking Run Now prompts StarTeam Notification Agent to notify the next participant without waiting for the step notification interval to expire.

Back to top

Running StarTeam Notification Agent as a Service

Many customers run both the StarTeam Server and StarTeam Notification Agent as services.

When running the StarTeam Server and StarTeam Notification Agent on the same computer, the StarTeam Server process must start before the StarTeam Notification Agent attempts to start. The best way to accomplish this is to set up a service dependency within Microsoft Windows.

If you are running the StarTeam Server as a service and StarTeam Notification Agent as a dependent service, you cannot shut down the StarTeam Server unless the StarTeam Notification Agent service is shut down first.

To avoid dependent servers, some customers run the StarTeam Server and StarTeam Notification Agent on different computers. When using two computers, you must first synchronize the times on both computers. If StarTeam Notification Agent returns a View Configuration exception, the two computers are probably not synchronized.

To run an instance of StarTeam Notification Agent as a service, do one of the following:

  • Modify the command stored in the NotificationAgentService.bat file and then run the batch file.
  • Copy the updated command to the command line.

The example initially in this file is:

JavaService.exe -install NotificationAgent "C:\Program Files\Micro Focus\Java\
Sun1.4.1_02\bin\client\jvm.dll" -Djava.class.path="C:\Program Files\Micro Focus\
StarTeam Notification Agent\agent.jar";"C:\Program Files\Micro Focus\StarTeam
Notification Agent\starteamxx.jar" -Djava.library.path="C:\Program Files\Micro Focus\
StarTeam Notification Agent";"C:\Program Files\Micro Focus\StarTeam SDK x.x\lib"
-start com.starbase.starteam.workflow.NARuntime. NotificationAgentFrame -
params -service "C:\Program Files\Micro Focus\StarTeam Notification Agent\
localhost_49201.nac" -stop com.starbase.starteam.workflow.NARuntime.
NotificationAgentFrame -method stopAgent -out "C:\Program Files\Micro Focus\
StarTeam Notification Agent\NAService.log" -err "C:\Program Files\Micro Focus\
StarTeam Notification Agent\NAService.log" -current "C:\Program Files\Micro Focus\
StarTeam Notification Agent"
pause

This file contains several complete paths that you may need to replace with appropriate path names from your system. Most of these paths are delimited by double-quotation marks. These paths represent:

  • The path to the Java Runtime Environment on your computer. The .bat file uses the following path as an example: C:\Program Files\Micro Focus\Java\Sun1.4.1_02\bin\client\jvm.dll.
  • The class path, which requires two paths:

    • The path to the StarTeam Notification Agent .jar file (agent.jar). If you used the default installation location for StarTeam Notification Agent, this is "C:\Program Files\Micro Focus\ Notification Agent\agent.jar" and does not need to be changed.
    • The path to the StarTeam runtime .jar file (starteamxx.jar). If you used the default installation location for StarTeam Notification Agent, this is "C:\Program Files\Micro Focus\Notification Agent\starteamxx.jar" and does not need to be changed.
  • The library path, which requires two paths:

    • The first is very similar to the path to the folder that contains agent.jar. If you used the default installation location for StarTeam Notification Agent, this is "C:\Program Files\Micro Focus\Notification Agent\agent" and does not need to be changed.
    • The second is the path to the folder that stores the Java version of the StarTeam runtime file (starteam-sdk.jar). For example, if you used the default installation folders, this would be "C:\Program Files\Micro Focus\StarTeam SDK x.x\lib" as found in the .bat file.
  • The service path, which is the complete path to the .nac file (StarTeam Notification Agent configuration file) for the instance of the agent being run as a service. This is usually similar to the path already in the .bat file ("C:\Program Files\Micro Focus\Notification Agent\localhost_49201.nac"). The .nac file contains options for a specific instance of the agent and its naming convention identifies both the computer and the port used by StarTeam Notification Agent.
  • The err and out paths, which are the paths to an output log file. If you used the default path, this would be “C:\Program Files\Micro Focus\StarTeam Notification Agent\ NAService.log” as found in the .bat file following both -out and -err.
  • The current path, which is the path to the StarTeam Notification Agent installation folder. This is usually "C:\Program Files\Micro Focus\StarTeam Notification Agent", as in the batch file.

After running NotificationAgentService.bat, this instance of StarTeam Notification Agent runs as an automatic service and can be managed as any other automatic service.

Caution: Changes to the registry should only be made by users who are experienced with the registry. Before making any changes always make a backup of the registry.

To set up a service dependency for Windows NT or 2000:

  1. Click Start > Run.
  2. Enter Regedt32.
  3. Click OK.
  4. Select HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\NotificationAgent
  5. Click Edit > Add Value.
  6. Set the Value Name to DependOnService.
  7. Set the Data Type to REG_MULTI_SZ.
  8. Enter your StarTeam Server Service name into the data window.

To set up a service dependency for WindowsXP:

  1. Click Start > Run.
  2. Enter Regedt32.
  3. Click OK.
  4. Select HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\NotificationAgent
  5. Click Edit > New > Multi-String Value.
  6. Set the Value Name to DependOnService.
  7. Double-click the DependOnService value to open the Data window.
  8. Enter your StarTeam Server Service name into the data window.

To find your service name:

Each application service has a service name and a display name. You are probably familiar with the display names that you have seen in the Services applet in the control panel. The DependOnService command requires the service name, not the display name.

  1. Click Start > Run.
  2. Enter Regedt32.
  3. Click OK.
  4. Select HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services.

    Search the list for any items prefaced with “StarTeamServer” .All application repositories are in a format of “StarTeamServer-RepositoryName”.

When the StarTeam Notification Agent runs, log files are placed into the installation folder "...\StarTeam Notification Agent". Review these logs to determine if the service is working successfully or not. Should changes need to be made to the NotificationAgentService.bat file to resolve problems, the following command will need to be run first to uninstall the service:

JavaService.exe -uninstall NotificationAgent

You can use a .bat file or enter the command at the DOS prompt. Run the command from the same location as you ran NotificationAgentService.bat file.

If an attempt to re-install the service fails after a successful uninstall, the server should be re-booted to complete the uninstall operation.

Back to top