The Get DS Parameter tool step can be very useful in situations where you want to set the value of a variable within a handler by setting the value of a Server Parameter in Interaction Administrator. This allows you to change the behavior of a handler without having to open the handler, modify the variable definition, save the handler, and publish it again.
You could use the Get DS Attr tool step instead, but the Get DS Parameter tool step offers a couple of advantages which make it a more attractive option.
An example use might be to set the telephone number to be used by the on-call IT Department member:
This literal string must be either “SERVER” or “SYSTEM.” “SERVER” represents a Server Parameter, and “SYSTEM” represents a System Parameter. You can use either, but usually you will use “SERVER”. It is very important to type this setting in ALL CAPS. Otherwise, it will not work.
The name of the parameter being queried. In the case of our example, we are going to look up the value of a Server Parameter named “OnCallNumber”.
Set this to true if you want the server parameter to be added if it does not exist already.
This is one of the features of the tool step which sets it apart from the Get DS Attr tool step. It is a good safeguard in case some well-meaning system administrator deletes the Server Parameter, not realizing its importance. You should set this value to true and set the Default Value field to value you would use if the set value somehow got deleted.
The default value of the specified parameter. This value will be assigned to the parameter if it is being created by this tool.
This is another differentiator from the Get DS Attr tool step. Used in conjunction with Add Parameter set to true, this guarantees that you will have at least some value to use in your handler, even if the Server Parameter was inadvertently deleted, or the parameter is intact but the value was deleted. In our example, it is set to the phone number we want to call as a default.
The value of the parameter. In our example, we are assigning the value of the Server Parameter to a variable named sOnCallNumber. The value will always be returned as a String data type. If you want to use it as a different data type, you will have to follow the Get DS Parameter tool step with an Assignment tool step to convert the value to the desired data type.
This path is taken if the value for the specified parameter is retrieved. Note: If you leave the value of Add Parameter set to false, this step will not take the Success exit path if someone deletes the Server Parameter. That is why it is highly recommended that you set Add Parameter to true and supply a value in the Default Value parameter.
This path is taken if the operation fails. Once again, usually because someone deleted the Server Parameter and Add Parameter is set to false.
Hopefully you find this information useful! Please post in the Comments and let me know if there is another Handlers-related topic you’d like to see explored.
George Ganahl, Master Training Consultant