AttestationPolicy CreateAttestation Method extended examples / usage ?

Hi - hopefully someone can point me in the right direction.

Looking for documentation / examples on use of the extended CreateAttestation methods that either use Delegate to update attestation case via callback function - or use a parameter dictionary passed to populate property on generated Attestation Case.

Use Case: Customer has 2 attestation generation scenarios :

  • Event Based - when some properties on the Person Changes eg Role / Disabled - Custom process triggers attestation cases for validation of entitlement assignment
  • Scheduled - broader scheduled validation campaigns - time based.

They would like to be able to differentiate between the two attestation cases scenarios for reporting.

Currently - model is to use two seperate / similar Attestation policies - one for event based - other for scheduled.  The reports can then be generated based on filter of Attestation Policy used.

This results in a lot of clutter - separate reports for each policy.

I was looking at the CreateAttestation methods and overloads used when generating the attestation cases - and was hoping to be able to simplify the model by injecting a property value into the attestationcase when generated - that can then be used as a filter later.

 Public Function CreateAttestation(session As VI.DB.Entities.ISession, entity As VI.DB.Entities.IEntity, strObjectKey As String, createCallback As CreateObjectDelegate, ct As System.Threading.CancellationToken) As System.Threading.Tasks.Task(Of VI.DB.DbObjectKey)
Member of ATT.Customizer.AttestationPolicy

Public Function CreateAttestation(session As VI.DB.Entities.ISession, entity As VI.DB.Entities.IEntity, strObjectKey As String, dicData As System.Collections.Generic.Dictionary(Of String, Object), ct As System.Threading.CancellationToken) As System.Threading.Tasks.Task(Of VI.DB.DbObjectKey)
Member of ATT.Customizer.AttestationPolicy

  • I've created the following sample that sets the XTouched property in the AttestationCase to "E" using the dictionary.

    HTH

    Public Sub DEMO_CreateAttestationWithProperty(ByVal objKeyAttPolicy As String, ByVal XObjectKey As String)
        Dim AttestationPolicy As AttestationPolicy = Nothing
        ' Check if policy and object to attest have been provided
        If Not String.IsNullOrEmpty(objKeyAttPolicy) AndAlso Not String.IsNullOrEmpty(XObjectKey) Then
            ' try to load AttestationPolicy
            If Session.Source.TryGet(Of AttestationPolicy)(New DbObjectKey(objKeyAttPolicy), EntityLoadType.Interactive, AttestationPolicy) Then
                ' Create the attestation case for the object and set the XTouched property to E
                AttestationPolicy.Entity.CallMethod("CreateAttestation", XObjectKey, New System.Collections.Generic.Dictionary(Of String, Object) From {{"XTouched", "E"}})
            End If
        End If
    End Sub

  • Great - thank you Marcus - it was not clear from the Doco what the Key / Values in the Dictionary would represent - parameters for the SQL Stored Proc  used to generate the Attestation Case - or Properties of the generated case.

    From your example it's now clear that they are Property Names for the generated Attestation Case.

    For anyone stumbling across this - it also appears that values provided in the dictionary at run time will overwrite those specified in the Attestation Procedure ! - so can set default value in Attestation Procedure - and overwrite if required when triggering generation ! 

    BTW - Any idea where the Customizer Documentation for v8 is located ? - Cannot find on v8.1.3 file set - having to use v6 version.

  • Sadly, there is no customizer documentation for 8.x or higher just the object layer class documentation OneIM_QBM_ObjectLayer.chm.

    But we do have a task in our backlog for it.