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
  • The deferred operations do not support this.

    But you can generate an event with the start time of the first process step set to the future.

    The following code sample demonstrates this for ISingleDBObject and for IEntity.

    #If Not SCRIPTDEBUGGER Then
        Imports System.Collections.Generic
    #End If
    Public Sub SDK_GenerateEvent_StartingInTheFuture()
        Dim htParameter = New Dictionary(Of String, Object)(StringComparer.OrdinalIgnoreCase) ' Dictionary for any additional parameters
     
        Dim dbObj As ISingleDbObject = Connection.CreateSingle("DialogTimeZone""QBM-FF60FBBFC1C18061DF4456004F7B34D2")
     
        ' Add parameter __STARTTIME with the start time of your choice.
        htParameter.Add("__STARTTIME"DateTime.UtcNow.AddDays(10))
     
        ' OPTION 1: Generation using ISingleDBObject
        VI.DB.JobGeneration.JobGen.Generate(dbObj, "UPDATEUTCOFFSET", htParameter)
     
         ' OPTION 2: Generation using UnitOfWork and iEntity
        Using uow As IUnitOfWork = Session.StartUnitOfWork()
            uow.Generate(dbObj.GetEntity(), "UPDATEUTCOFFSET", htParameter)
            ' Commit the changes         uow.Commit()     End Using End Sub
  • What would be the parameter name for defining queue name? (just queuename) ? ....I need to start some fire event generations in a queue other than primary SQL processing queue!

  • I think you are getting it all wrong. You do not specify a queue during the event generation, the queue to use will be defined by the settings for the execution server in your process steps. So if you want to execute a process on a different queue based on some parameter, you need to use a custom script to generate the execution server in the process steps of your process.

Reply Children