You will first need to create a script or application that accepts information as command line parameters and writes that information to a log file. You can make this script or application as simple or as elaborate as needed to fulfill your logging requirements, and can use whatever language works best for you. This script will run on the SCM Broker machine (server-side) and should be created to run silently (without run-time input from the user). All the information needed to run the script or application (including user comments) will come in from parameters on the command line. As you design this script, make sure that the comment is the last field in the list of parameters.
I have created a very simple example Windows batch script that accepts parameters passed in on the command line and appends them to the end of a log file:
Next, you will open Administrator Tool, navigate to the project and state for which you want this logging to occur, and create a new “UDP” process. You will use the Harvest “System” variables to pass into the process the name of your broker, project, state and package, whatever information you need, up to the point of entering the comment. Make sure the “Allow Additional Input” field is checked.
(Program field = C:\Users\Administrator\LogMyPromotion.bat "[broker]" "[project]" "[state]" ["package"])
Notice that the comment parameter is not included on the command line in the Program field. This is because the comment will be supplied in the “Additional Input” field at runtime.
You will also create a post-linked process for your new UDP process that executes the hpp (Promote Package) command line utility. Here, as well, you can use the Harvest “System” variables to provide the needed information to execute the process.
(Program field = hpp ["package"] -b "[broker]" -en "[project]" -st "[state]" -usr [user] -pw [password])
To use this new UDP process, in Workbench the user will right click on a package and select the UDP you created to promote the package. A dialog will pop up providing the “Additional Input” field that your user can use to enter his comments for the log file. Once he clicks OK the script executes, followed by the “hpp” command.