dbo.POL_TIATTPersonInBaseTree
Database TriggerSQL_TRIGGERSandbox DB
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: PersonInBaseTree
Typed Edges
- queues DBQueue task ATT_ZAttestationHelperFill at line 8 Bulk DBQueue insert -> ATT-K-AttestationHelper / ATT_ZAttestationHelperFill at line 8
- trigger on table PersonInBaseTree Trigger parent table: PersonInBaseTree
- 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
1CREATE trigger POL_TIATTPersonInBaseTree2 ON PersonInBaseTree FOR3INSERT NOT FOR Replication4AS5BEGIN6 BEGIN TRY7 IF EXISTS(8 SELECT TOP 1 19 FROM inserted)10 GOTO start11 RETURN start:12 DECLARE @GenProcID varchar(38)13 SELECT @GenProcID = dbo.QBM_FGISessionContext('')14 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw15 INSERT INTO @DBQueueElements_01(object,16 subobject,17 genprocid)18 SELECT19 x.uid,20 NULL,21 @GenProcID22 FROM(23 SELECT ac.UID_attestationcase AS uid24 FROM inserted i25 JOIN QERPolicy qp26 ON i.UID_Org = qp.UID_AERoleAttestator27 JOIN attestationcase ac28 ON ac.ObjectkeyBase = qp.XObjectKey29 JOIN AttestationHelper ah30 ON ac.uid_attestationCase = ah.uid_attestationcase AND ah.UID_PWODecisionRule IN('POL-PWODecisionRule-AY')31 UNION32 SELECT ac.UID_attestationcase AS uid33 FROM inserted i34 JOIN QERPolicy qp35 ON i.UID_Org = qp.UID_AERoleAttestator36 JOIN QERPolicyHasObject pho37 ON qp.UID_QERPolicy = pho.UID_QERPolicy38 JOIN attestationcase ac39 ON ac.ObjectkeyBase = pho.XObjectKey40 JOIN AttestationHelper ah41 ON ac.uid_attestationCase = ah.uid_attestationcase AND ah.UID_PWODecisionRule IN('POL-PWODecisionRule-AY')) AS x42 EXEC QBM_PDBQueueInsert_Bulk 'ATT-K-AttestationHelper',43 @DBQueueElements_0144 END TRY45 BEGIN CATCH46 EXEC QBM_PSessionErrorAdd DEFAULT47 RAISERROR('',48 18,49 1)50 WITH NOWAIT51 END CATCH52 ende:53 RETURN54END
Open raw exported source
1 create trigger POL_TIATTPersonInBaseTree on PersonInBaseTree for Insert not for Replication as begin BEGIN TRY if exists (select top 1 12 from inserted) goto start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') declare @DBQueueElements_01 QBM_YDBQueueRaw3 insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select ac.UID_attestationcase as uid from inserted4 i join QERPolicy qp on i.UID_Org = qp.UID_AERoleAttestator join attestationcase ac on ac.ObjectkeyBase = qp.XObjectKey join AttestationHelper ah on ac.uid_attestationCase5 = ah.uid_attestationcase and ah.UID_PWODecisionRule in ('POL-PWODecisionRule-AY') union select ac.UID_attestationcase as uid from inserted i join QERPolicy6 qp on i.UID_Org = qp.UID_AERoleAttestator join QERPolicyHasObject pho on qp.UID_QERPolicy = pho.UID_QERPolicy join attestationcase ac on ac.ObjectkeyBase7 = pho.XObjectKey join AttestationHelper ah on ac.uid_attestationCase = ah.uid_attestationcase and ah.UID_PWODecisionRule in ('POL-PWODecisionRule-AY')8 ) as x exec QBM_PDBQueueInsert_Bulk 'ATT-K-AttestationHelper', @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR (''9, 18, 1) WITH NOWAIT END CATCH ende: return end 10