If you’re like me, you like to put descriptive text in a link to describe what it does. Perhaps it’s to indicate the conditions of a branching structure, like this:
But what’s annoying is that when you turn on the Link text, every link has the word “Link” on it (as if you didn’t know it was a link). Not only is that annoying but it clutters up the display with text you don’t want to see. So how can you get rid of that? Well, there are actually a few ways to do this.
Inserting a Blank Space
You’ve probably already tried and discovered that if you open the properties of the link and just delete the “Link” text and save it, the text is right back there. Likewise, if you just enter a space character, it does the same thing. This is because by default the code that sets the link values ignores null values and values that are nothing but spaces and just returns the link to its previous value (whatever that it).
But you can fool the link into putting a space in there by entering a special ASCII character. Open the link properties, go to the General tab, delete the Link text, and then insert this ASCII character by holding down the ALT key and then typing 0160 (using the number pad – they number keys above the letters won’t work). The result is that there’s a tiny little break in the line where that character was inserted:
Changing the Default Links to No “Link” Text
So modifying the links on the fly is great, but how can you avoid having the “Link” text appear in the first place? Well that’s pretty simple too, but it requires creating an XML file. Now this advice is a bit different than the advice I gave for Opalis. In Opalis, all of the strings were contained in XML files. In Orchestrator, we’ve converted most of the strings to resource DLL files to make it easier for localization. However, we will still load strings from XML if they are there, and more importantly, if it finds an XML file with the string it needs first, it doesn’t try to load the one in the DLL. So knowing that fact is an advantage here because we can create an XML file containing the string we want for the Link text and it will override the value in the DLL!
Strings in the Runbook Designer are managed by XML and DLL files located here:
- (32-bit systems) C:\Program Files\Common Files\Microsoft System Center 2012\Orchestrator\Strings
- (64-bit systems) C:\Program Files (x86)\Common Files\Microsoft System Center 2012\Orchestrator\Strings
In the appropriate directory above, create a new file named OrchestratorMain.Strings.xml
Enter the following XML into the file (making sure there is a space in the “str_Link: value:
Save the file and open the Runbook Designer (close and reopen if it was already open). Now when you drag new between activities, they default to no text at all (not even the space), like this:
Getting Dangerous: Modifying Existing Link Text via SQL Query
Now that you’ve seen how to modify the link text on the fly and to modify the default link text, what about those hundreds of existing runbooks you have that all have “Link” everywhere? How do you fix those?
The title of this post sounds a bit scary, right? Well, it’s intended to be scary because I’m going to show you something to make you dangerous. This is not something that you should do without a thorough understanding of SQL queries and a complete backup of your Orchestrator database before continuing!
The process described in this article involves editing the Orchestrator SQL database. If you are not comfortable with this, then do not do it.
You should always back up your database before making any manual changes like this. I have only done minimal testing in a limited environment that probably doesn’t come close to your own environment’s configuration.
Neither I nor Microsoft, nor any other person, animal, vegetable or mineral assumes responsibility for the process demonstrated here. USE AT YOUR OWN RISK!
All activities in your runbooks are stored in the Orchestrator database in the OBJECTS table. Within the table is a field called NAME which contains the display name of the activity. It just so happens that links are activities too, and it’s easy to find all of the links on all your workflows that have the default text of "Link" using a simple query:
Now you’ve probably got a LOT fewer runbooks than I do in my database, because when I ran this query, it returned 4,036 rows. That’s 4,036 different links that have the default text. I’d have to have a LOT of free time if I wanted to go modify these individually! By the way, I included the "ObjectType" field in the query just so I could confirm that all of these were links and not some other object. To be sure, I re-ran the query and added another condition in the where clause to exclude objects of the ObjectType I saw, and nothing was returned, so I know they were all Links.
Now the dangerous part… to convert this to an UPDATE query.
Since the Name field cannot be null, we’ll replace the "Link" with just a space and see what happens.
I run this and it says 4,036 rows affected. That’s reassuring…
Now I close and re-open the Runbook Designer … and all my links that had "Link" text are now solid lines! Woo Hoo!
I hope you find this useful in visually cleaning up your workflows. Enjoy!