Model context is a complex data structure that describes the context of computation in Clockwork and Projector components. It is also used inĀ Hooks, Scripting Hooks, Workflows (midPoint 3.x) and other components that take part in the computation.

The model context is putting together the "focus" and "projections" that belong together. Focus is usually a user, projections are accounts. In such a case the model context groups together a user with all the accounts are associated with that accounts. These are usually accounts that are linked to the user. But it also may be a new account that was not yet created, an old account that was recently deleted, etc. MidPoint groups all these objects together to allow efficient computation of assignments and mappings and other policies.

Model Context has three parts (see Clockwork and Projector page for explanation of terms used here):

Focus and projection parts have similar structure. Both of these parts contain:

Implementation Notes

"Model Context" is a public name of this data structure as it is exposed by the IDM Model Interface (midPoint Model API). It is internally implemented by a very rich LensContext data structure. It is designed to be serializable therefore it can be used in long-running asynchronous processes that include human tasks (such as workflows). It is serialized in an upgradeable data format (currently XML) which allows running processes (such as workflows waiting for approval) to survive system upgrades.

See Also