I have a open case on this but felt I should share with the field. We use substitute links on our BOMs to denote replacements of parts in the context of a specific assembly. When you create a substitute link, you are forced to check out the BOM, create the link and then check it in. Understand that the substitute link is between a Part and a line item on a BOM. We discovered that if a substitute part has no other where used, you are able to delete that part without any referential integrity exception. The part and its substitute link will be deleted.
This means if you have a released BOM sitting there for years with substitutes, its possible to at a later time, delete the substitute parts from PDMLink. The resulting BOM will show as if those subs never existed at all. I was informed this was "working to spec" but disagree. This was with 11.1 but I know it had existed in previous versions. What are your thoughts? Bug? Design flaw? Enhancement request?
Remember, 'working to spec' doesn't mean it's supposed to work this way, it just means no one bothered to state in writing that it it shouldn't work this way. It doesn't matter how illogical something is, if someone at PTC doesn't explicitly state in some spec that it must function differently, then they see themselves as free from any responsibility for the poor or illogical behavior. After 15 years of working with PTC tech support I've come to hate the phrase 'working to spec'. It's too frequently used as an excuse for a poorly performing product with no commitment to do anything about it. For the most part, creating product ideas doesn't help either. The only way to really get things like this changed is through one on one dialog directly with the product manager responsible for this area. That was the real value of in-person events like LiveWorx and especially the PTC/USER winter conference - direct access to the product managers.
That's one of my best parts of LiveWorx. Many are very approachable and its nice to have a peer to peer conversation. On the subject of "working to spec", years ago I came across one when loading in IBA values. Forget if it was via Excel or XML but here is the gist. If you provided a string attribute to load and its value was blank (or null if you prefer), when you looked into the system, the value of that attribute was "Default", the word "Default". Here is how I envisioned the spec:
"If the value of of the IBA being loaded in is null, use Default value."
Check. Working to spec.
I assume if you try to remove the substitute from the PSB structure , you need also to checkout the parent ... So inconsistent behaviour ...
Unfortunately the integrity exception is probably regarding a parent "Business Object", not a parent "Business Link"
And agree again for direct contact to PMs. lot of examples of "work to spec" cases transformed in SPR/Bug fix after a direct explanation of the use case...
Let's consider what is going on under the hood.
A Substitute creates a link between an existing Usage link (A role) and the Master of the substitute Part (B role).
The existing Usage link is a link between Master of the Part being substituted (B role) and the Part whose structure the master is in (A role). The Usage link simply links the PartMaster to the Part's structure.
So, the only thing new in the dB is the Substitute link between an existing Usage link (A role) and the Master of the substitute Part (B role).
With this in mind, since when can you delete the B role object in any link without first deleting (or breaking) the link?
This is like being able to delete a component Part that is used in a Part structure with no error or warning. Just delete and boom, it's gone.
Seems crazy to me but what do I know.
I guess the Substitute link is special?
Does the Alternate link works the same way? My money says, yes.
I'd suggest a post delete listener that checks if a Part master is referenced by a SubstituteLink. If it is maybe throw "WTPartMaster number XXXXXXX is referenced by Substitute Link id:YYYYYYYY. See your Administrator for help."