Skip to main content
23-Emerald IV
August 23, 2019
Question

How to hide parent object type but leave sub-type visible and Instantiable

  • August 23, 2019
  • 2 replies
  • 3146 views

Is it possible to hide a parent object type but leave the sub-type visible and instantiable?

 

I'm exploring the possibility of using sub-typed WT parts for a particular project I'm working on.  For testing I've created two different sub-types, both with unique attributes.  (We don't currently use WT parts for anything else.)  When I go to create a new part, both the original parent WT Part and my two sub-typed parts are visible.  I'd like to limit the selection to only my sub-typed parts and not display the parent type.  If I make the parent type not instantiable then the sub-types disappear.  Is there some other way to hide the parent type, or make it not instantiable, while still retaining the two sub-types?  Maybe something with OIRs???

 

Parent Type.png

2 replies

17-Peridot
August 23, 2019

I would let the main type instantiable, otherwise you won't have sometimes problem with selecting it in the configuration. E.g. in the policy administration. You can't add any policy for wt.part.WTPart if it is not instantiable.

You have now two possilbilities.

Add another level eg.

WTPart

 |--DumyPart. ->not instantiable

    |--Layout

    |--...

Or you need to set all the policies for each subtype. It just depends on the use case.

TomU23-Emerald IVAuthor
23-Emerald IV
August 23, 2019

Is there any way to specify what sub-type should be used via OIR?  I'm okay with only one sub-type being active per context, as long as doing this will hide the parent type.

17-Peridot
August 23, 2019

Normally you define an OIR for the WTPart. This is also valid for all subtypes.

Then you only create a OIR for the subtypes which have different settings, e.g. number generator, folder, etc. 

22-Sapphire I
August 23, 2019

I've done in this for a long time - make the root type not instantiable, and use only sub types. 

It's rare that you need to make the root type instantiable and easy to temporarily make that change.  Most often it's just a matter of Policy Administrator.

Both ACLs and OIRs can be set on the root type, with overrides as needed on the sub type - a very elegant and effective way to configure many things.

Note: An alternative is a bit messy and not so elegant but works. If you leave the root type instantiable but don't want users to be able to create it, configure an OIR on the root type with a lifecycle that doesn't exist. This removes that type from any drop-down.