Back to OIM Explorer

dbo.CPL_TUATTComplianceRule

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on ComplianceRule. Bulk DBQueue insert -> ATT-K-AttestationHelper / ATT_ZAttestationHelperFill at line 8; References QBM_PDBQueueInsert_Bulk; Trigger parent table: ComplianceRule

Source: sandbox-db sys.sql_modules

Source size: 1.346 characters

Interpretation

  • Database trigger. Treat parent table and enqueue/object-layer calls as the main relation points.
  • DBQueue relation detected. Follow the task procedure and referenced-by list for async processing.

Relations

  • Bulk DBQueue insert -> ATT-K-AttestationHelper / ATT_ZAttestationHelperFill at line 8
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: ComplianceRule

Typed Edges

  • queues DBQueue task ATT_ZAttestationHelperFill at line 8 Bulk DBQueue insert -> ATT-K-AttestationHelper / ATT_ZAttestationHelperFill at line 8
  • trigger on table ComplianceRule Trigger parent table: ComplianceRule
  • references source dbo.QBM_FGISessionContext source text reference
  • references source dbo.QBM_PDBQueueInsert_Bulk source text reference
  • references source dbo.QBM_PSessionErrorAdd source text reference

References

Referenced By

  • No direct source references extracted.

Complete Source

SQL60 lines
1CREATE trigger CPL_TUATTComplianceRule2  ON ComplianceRule FOR3UPDATE NOT FOR Replication4AS5BEGIN6  BEGIN TRY7    IF EXISTS(8      SELECT TOP 1 19      FROM inserted)10    GOTO start11    IF EXISTS(12      SELECT TOP 1 113      FROM deleted)14    GOTO start15    RETURN start:16    DECLARE @GenProcID varchar(38)17    SELECT @GenProcID = dbo.QBM_FGISessionContext('')18    DECLARE @errno int19    DECLARE @errmsg nvarchar(255)20    IF21    UPDATE(UID_OrgAttestator)22    BEGIN23      DECLARE @DBQueueElements_01 QBM_YDBQueueRaw24      INSERT INTO @DBQueueElements_01(object,25      subobject,26      genprocid)27      SELECT28        x.uid,29        NULL,30        @GenProcID31      FROM(32      SELECT ac.UID_attestationcase AS uid33      FROM inserted i34      JOIN attestationcase ac35        ON ac.ObjectkeyBase = i.XObjectKey36      JOIN AttestationHelper ah37        ON ac.uid_attestationCase = ah.uid_attestationcase AND ah.UID_PWODecisionRule IN('CPL-PWODecisionRule-AR')38      UNION39      SELECT ac.UID_attestationcase AS uid40      FROM inserted i41      JOIN personinBaseTree pin42        ON i.uid_NonCompliance = pin.uid_org AND pin.XOrigin > 043      JOIN attestationcase ac44        ON ac.ObjectkeyBase = pin.XObjectKey45      JOIN AttestationHelper ah46        ON ac.uid_attestationCase = ah.uid_attestationcase AND ah.UID_PWODecisionRule IN('CPL-PWODecisionRule-AR')) AS x47      EXEC QBM_PDBQueueInsert_Bulk 'ATT-K-AttestationHelper',48        @DBQueueElements_0149    END50  END TRY51  BEGIN CATCH52    EXEC QBM_PSessionErrorAdd DEFAULT53    RAISERROR('',54    18,55    1)56      WITH NOWAIT57  END CATCH58  ende:59  RETURN60END
Open raw exported source
SQL ยท Raw10 lines
1 create   trigger CPL_TUATTComplianceRule on ComplianceRule  for Update not for Replication as begin  BEGIN TRY if exists (select top 1 1 from inserted2) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext3('') declare @errno int declare @errmsg nvarchar(255)  if update(UID_OrgAttestator) begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_014 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select ac.UID_attestationcase as uid from inserted i join attestationcase ac on ac.ObjectkeyBase5 = i.XObjectKey join AttestationHelper ah on ac.uid_attestationCase = ah.uid_attestationcase and ah.UID_PWODecisionRule in ('CPL-PWODecisionRule-AR') union6 select ac.UID_attestationcase as uid from inserted i join personinBaseTree  pin on i.uid_NonCompliance = pin.uid_org  and pin.XOrigin > 0 join attestationcase7 ac on ac.ObjectkeyBase = pin.XObjectKey join AttestationHelper ah on ac.uid_attestationCase = ah.uid_attestationcase and ah.UID_PWODecisionRule in ('CPL-PWODecisionRule-AR'8) ) as x  exec QBM_PDBQueueInsert_Bulk 'ATT-K-AttestationHelper', @DBQueueElements_01 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR9 ('', 18, 1) WITH NOWAIT END CATCH ende: return end 10