MidPoint has several built-in object types such as roles, orgs, and services. Those object types may look innocent at the first sight. They look like ordinary concepts that almost any other IDM system has. But there is much more under the surface. Roles, orgs, and services can act as a smart replacement for generic objects. Roles, orgs, and services can be used to model a broad variety of object types: job categories, titles, projects, teams, responsibilities, locations, policy categories, devices, ...
Subtype is a schema property that can be used to distinguish those data types. It is simple, multi-valued property. Currently, there is just a very little logic associated with subtype. E.g. object template can be applied on per-subtype-basis. However, as many midPoint mechanisms use search filters, subtype can be very useful. E.g. subtype can be easily used in authorizations, global policy rules and so on.
Subtype are replaced by Archetypes
MidPoint 3.x used mechanism of subtype to implement parts of the functionality provided by archetypes. In MidPoint 4.0, Archetypes should provide complete replacement for subtype functionality. Subtype will still work in midPoint 4.x, but it is no longer a recommended mechanism - except for assignment subtype, which is still useful. Subtypes will be most likely deprecated sometime during midPoint 4.x lifetime and the plan is to remove it completely in midPoint 5.0.
Historical note: the original idea was to implement archetypes as an extension of the subtype functionality. But it was discovered during the detailed design of archetype functionality that we can do it much better. Current form of archetype functionality fits perfectly with existing midPoint features and it is much more powerful than originally planned. Therefore the idea of subtype-based archetypes was dropped.
Subtypes and Metaroles
Subtype is a simple schema property. The purpose of subtype is to be able to quickly look for objects of a particular type. Therefore it has to be simple to be efficiently indexed and processed even in big midPoint deployments.
This also means that subtype alone cannot define all the complexities of behavior set for individual object types. Therefore subtype is often combined with metaroles. Metaroles are a very efficient mechanism to specify common behavior and policies for groups of objects.