Skip to main content
Aug 23, 2019 2:31 PM UTC
Question

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

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

5 replies

Aug 23, 2019 2:45 PM UTC

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.

TomUAuthor
Aug 23, 2019 2:59 PM UTC

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.

Aug 23, 2019 7:02 PM UTC

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. 

Aug 23, 2019 5:13 PM UTC

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.