Identity Manager

Create a Deferred Event Generation Operation from a Script

Hello,

We are migrating a client from 6.1.2 to 7.1.1. In their 6.1.2 environment they have a script that creates deferred operations to generate an event for process generation using classes from the VI.DB.DeferredOperations namespace. Here is the code snippet:

 

 
Dim newEffDate As DateTime = resEffectiveDate.AddHours(1.0)

Dim saveTask As DeferredOperations.DeferredJobGenTask
saveTask = New DeferredOperations.DeferredJobGenTask("SAVE_LATER", params)

Dim op As DeferredOperations.DeferredOperation
op = New DeferredOperations.DeferredOperation(obj, saveTask, newEffDate)

op.Save()
 

However, v7.1.1 does not have the DeferredOperation and DeferredJobGenTask classes. Is there an alternative approach to get this done in v7.1.1?

 

This is similar to the forum post below where the OP is trying to create deferred operations to save objects instead of generating events:

https://www.quest.com/community/products/one-identity/f/identity-manager/6894/delayed-save-deferred-operations-via-dialogscript

 

Thanks in advance,

Febin

Parents
No Data
Reply
  • Hi Febin,

    just to ensure that everyone knows how-to do it.

     

    How-to create deferred operations in V7

    Introduction

    Starting with version 7 the deferred operations had to be restructured for the new object layer. An usage analysis led to the conclusion that the costs for keeping the class VI.DB.DeferredOperations.DeferredOperation in the compatibility layer were too high to keep it.

    Migration from 6 to 7

    If you used the class VI.DB.DeferredOperations.DeferredOperation in your scripts in version 6 or below, you have to change the usage accordingly in version 7.

    Samples

    The following two code samples demonstrate the use of the class VI.DB.DeferredOperations.DeferredBlock in version 7.

    Sample: Using a Deferred Block for IEntities

    ' Create a new DeferredBlock for a point in time.
    Using New VI.DB.DeferredOperations.DeferredBlock(Session, DateTime.UtcNow.AddDays(45), "Optional description for operation")
        ' Operations done here are done deferred
        Dim dbObj = Session.Source().CreateNew("PersonInOrg")
        dbObj.PutValue("UID_Person""a76311be-c2cd-4be3-be5d-b8d85c3bb863")
        dbObj.PutValue("UID_Org""b0b4be5a-bcc1-453d-aaf5-b5a7d8531224")
     
        Using uow = Session.StartUnitOfWork()
            uow.Put(dbObj)
            uow.Commit()
        End Using
    End Using
    

    Sample: Using a deferred block for ISingleDBObjects

    ' Create a new DeferredBlock for a point in time.
    Using New VI.DB.DeferredOperations.DeferredBlock(Connection, DateTime.UtcNow.AddDays(45), "Optional description for operation")
        ' Operations done here are done deferred
        Dim dbObj = Connection.CreateSingle("PersonInOrg")
        dbObj.PutValue("UID_Person""a76311be-c2cd-4be3-be5d-b8d85c3bb863")
        dbObj.PutValue("UID_Org""b0b4be5a-bcc1-453d-aaf5-b5a7d8531224")
        dbObj.Save()
    End Using
Children
No Data