Objective:
A tip on how to use the TIBCO Designer to find the unused global variables and remove them from your project. This will help you keep your project clean, and clutter free. And it will help the deployment process easy.
Brief description of the issue:
I have come across this issue so many times, that I could blindly say that about 90% of TIBCO applications developed today, would having unused global variables, after the development cycle.
If you are a TIBCO Administrator, and when you are requested to deploy an TIBCO BW application, you will come across the request for setting the global variables properly. And then when you go to change the global variables, you will find that there are too many unused global variables for which, you are requested to set dummy values, or leave it blank or even set a value like 'Not Applicable'.
If you are doing scripted deployment using 'AppManage', this issue might not surface at deployment administrator's level, but it will go down one level to developers, who has given you the configuration files with these global variables. When you ask the developer, you will find that it is not that he kept them intentionally, but he is also helpless or ignorant or does not have so much time to go through each and every global variable, and processes and activities, and figure out what is really used or not used. Also, he will say that, he has taken a TIBCO project template and that already had all these global variables, and he did not know what they are for, and how that should be used, so he just left it that way.
If you are an developer who is not really experienced or does not have time, you could be doing this unintentionally.
Solution to this issue:
The developer while working in TIBCO Designer can verify all the global variables usage, and make sure all they are really used in the project except the default global variables which TIBCO Designer creates. The easiest way to verify all the global variables are used, is to use a tool supplied within TIBCO Designer. Its called "Find Global Variable Usages" under the Tools menu.
Let's take a look at a global variable that we want to find where it has been used. The following screenshot shows a global variable that we want to search. In the screenshot below, we are interested to find all the usages for global variable "BW_approval_file". We have high lighted the global variable.
Screenshot 1: Show the global variable "BW_approval_file".
In the following screenshot let's open the "Find Global Variable Usages" tool:
Screenshot 2: Show the Tools -> Find Global Variable Usages menu
The next step would be to choose the global variable we are interested to search in this "Find Global Variable Usages" tool.
Screenshot 3: Choose the global variable
Next, click on "Find" button and it will search all occurring of "BW_approval_file" global variable. The search result is shown in the following diagram.
Screenshot 4: Search results of global variable "BW_approval_file".
In next step, you would click on any of the search results, and it would automatically show you that occurring of global variable usage high lighting the activity using it.
Screenshot 5: Show the activity which is using the global variable. This same process applies for processes as well. In the search results, you might have observed that it lists both the processes and activities which are using that global variable, and if you click at the process, it would high light the process, where as if you click on the activity, it will high the activity inside the process, which is what we generally look for.
Now before I conclude, I want to show another screenshot of, how the search results would look like, when there are no matching global variables usage found.
Screenshot 6: No matches found.
This is the key solution point. When you see that a global variable usage has 'No Matches Found', you need to decide if this global variable is something that a user (architect while developing the project template, or a designer/developer added while developing the process or if this was something created by Designer by default), and then delete that global variable if that is really not intended to be used in future.
Conclusion:
I hope this blog has been a useful tip for you. In the next blog I would like to show another tip on how to add an activity inside an inner group.