CreationType difference

HI, 

I'm busy with some UnitTesting for OneIdentity. 

For creating objects you call the function Session.Source().CreateNew(Object, CreationType)

There are multiple options for the CreationType parameter but I don't know what the difference is between the options.

The parameter CreationType is not mandatory.

So my questions:

What is the default CreationType if not specified

What do the following CreationType options do

EntityCreationType.Default
EntityCreationType.DelayedLogic
EntityCreationType.Interactive

If any questions, let me know. 

Parents
  • Which version are you using?

    The EntityCreationType.Default is equal to EntityCreationType.DelayedLogic. If you take a look at the ObjectLayer documentation at Modules\QBM\documentation\en-US\OneIM_QBM_ObjectLayer.chm you will find that both enums having the value 0.

    In the UnitTesting sample on the product delivers underneath Modules\QBM\dvd\AddOn\SDK\UnitTestSamples\ you will find a simple explanation in one the samples. The EntityCreationType.Interactive is needed if the templates inside of the Entity should be executed immediately after providing a value to a property without a save of the complete entity.

    Delayed logic

    The delayed logic mode runs any business logic rules and methods when the entity is saved. A new entity for table Person using this mode can be created like this:

    var person1 = source.CreateNew("Person", EntityCreationType.DelayedLogic);
    

    This mode is the default, so these two calls are equivalent to the call before.

    var person2 = source.CreateNew("Person", EntityCreationType.Default);
    var person3 = source.CreateNew("Person");
    

    There are asynchronous versions of this function too.

    var person4 = await source.CreateNewAsync("Person");
    var person5 = await source.CreateNewAsync("Person", EntityCreationType.DelayedLogic);
    

    Interactive entities

    Interactive entities run business logic already on PutValue. Their primary application are user interfaces where users want to see the outcome of business logic directly.

    The downside of interactive entities lays in their greater resource usage, especially on application servers.

    To create an interactive entity you have to provide EntityCreationType.Interactive.

    var interactive = await source.CreateNewAsync("Person", EntityCreationType.Interactive);
    
  • Hi Markus,

    Thanks for your explanation! Very helpfull.

    PS, we are currently using 7.1.5.

Reply Children
No Data