OIS - Duplicate Link Finder
I have a “tip/trick” for you today. This is an edge case, but I wanted to make sure something was documented about it (as well as a way to easily identify/fix any occurrences within your OIS deployments).
SCENARIO:
You have a policy with two or more objects and when executed one or more of the downstream objects execute more times than expected. Now, it is very possible that the downstream objects are executing multiple times as they should, based on the pipeline workflow engine rules. You can verify this by checking to see if the upstream objects generate multiple lines of data. If they do, then the downstream object should execute multiple times (as many times as lines were generated).
If what you are seeing cannot be attributed to normal multiple execution behavior, you may have duplicate links between two or more of your objects.
WHY MIGHT YOU HAVE DUPLICATE LINKS?:
Duplicate links can occur with some copy/paste activities between policies. I tried for a while to reproduce the issue in my environment for this blog post, but I had to rely on existing policies that already had the problem (for the later examples). In general, the reproduction steps are:
Step 1: Highlight and Copy some objects and Links in an existing policy
Step 2: Paste these objects into a new policy (you will note that the preceding link is not pasted)
Step 3: Add a new object to this new policy and link it to the first object in the set of objects you just pasted
The highlighted link is where you would normally see the duplicate link behavior. Unfortunately, I was not able to reproduce the issue THIS time. That doesn’t mean you will never run into duplicate links. If you do, at least there is a method to identify and fix the issue.
IDENTIFICATION:
If you are experiencing the issue in the above scenario, then you have a clear place to look for duplicate links. Find the link directly before the object where the multiple execution seems to start. In the following example execution logs, it would be the link between the two highlighted objects:
For those of you that feel that the “Delete Dump Files” object is generating multiple lines of data legitimately (by deleting more than one file), see its test/example configuration:
It is configured to delete just one file, so there is no expected multiple execution. So we have to take a look at the link after this object and before the “Re-Test Disk Space” object. Oddly enough, upon initial inspection it looks like any other link:
Until you click on it:
If we zoom in, you can see that the entire link does not appear to be highlighted in blue:
This “overlay effect” is due to the fact that there are indeed two links between the “Delete Dump Files” and “Re-Test Disk Space” objects. This means, if the policy was configured to delete more than one file (in the “Delete Dump Files” object), two “Re-Test Disk Space” object executions would occur for each file deleted. In fact, to show you for the above example, this is what happens if the “Delete Dump Files” is reconfigured to delete more than one file (this time it deleted just two files):
This is certainly unexpected behavior and from the OIS Client GUI, this is the only easy way to identify duplicate links (other than the unexpected execution behavior itself).
IDENTIFYING ALL DUPLICATE LINKS:
While the above identification tip is nice for individual policies where you are experiencing unexpected execution behavior, what if you have hundreds of policies and want to be proactive?
Well I have something for you.
I call it the Duplicate Link Finder (attached to this post). I is a bit of SQL that I wrote a few years ago, that I recently pulled out of the archives and dusted off.
All standard DISCLAIMERS and WARNINGS apply. It is not supported and you should use it at your own risk. The SQL does a simple SELECT query of your existing Policy and Object data. It does not delete or modify your OIS data in any way. It works against OIS 5.4 and above (recently verified against OIS 6.3). If the schema changes, this SQL may become obsolete.
To give you an idea of how it works, please see the following:
The results in the above image show that I have six policies containing duplicate links.
The available fields are: Folder Path, Policy Name, Source Object Name, Target Object Name and Link Count.
This should give you everything you need to identify, track down and fix all your duplicate link issues.
FIXING DUPLICATE LINKS:
It is actually very simple. Once you have identified and tracked down which objects have duplicate links between them, delete one of the links.
Step 1: Identify the Objects and Click on the Link
Step 2: Right-Click on the Link and Select Delete
Step 4: Retest
I have to say, I hope you never encounter this issue, but if you do, I hope this was helpful.
enJOY!