dbo.ATT_TUAttestationObject
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-PrepropAttestationObject / ATT_ZAttestationObjectPreProp at line 8
- Bulk DBQueue insert -> ATT-K-PrepropAttestationWizardParm / ATT_ZAttestationWzParmPreProp at line 8
- Bulk DBQueue insert -> ATT-K-PrepropAttestationWizardParm / ATT_ZAttestationWzParmPreProp at line 12
- References QBM_PDBQueueInsert_Bulk
- Trigger parent table: AttestationObject
Typed Edges
- queues DBQueue task ATT_ZAttestationObjectPreProp at line 8 Bulk DBQueue insert -> ATT-K-PrepropAttestationObject / ATT_ZAttestationObjectPreProp at line 8
- queues DBQueue task ATT_ZAttestationWzParmPreProp at line 8 Bulk DBQueue insert -> ATT-K-PrepropAttestationWizardParm / ATT_ZAttestationWzParmPreProp at line 8
- queues DBQueue task ATT_ZAttestationWzParmPreProp at line 12 Bulk DBQueue insert -> ATT-K-PrepropAttestationWizardParm / ATT_ZAttestationWzParmPreProp at line 12
- trigger on table AttestationObject Trigger parent table: AttestationObject
- references source dbo.QBM_FGISessionContext source text reference
- references source dbo.QBM_PDBQueueInsert_Bulk source text reference
- references source dbo.QBM_PPrePropCheckSyntax source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
- dbo.QBM_FGISessionContext
- dbo.QBM_PDBQueueInsert_Bulk
- dbo.QBM_PPrePropCheckSyntax
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE trigger ATT_TUAttestationObject2 ON AttestationObject FOR3UPDATE NOT FOR Replication4AS5BEGIN6 DECLARE @ConditionsToCheck QBM_YParameterList7 BEGIN TRY8 IF EXISTS(9 SELECT TOP 1 110 FROM inserted)11 GOTO start12 IF EXISTS(13 SELECT TOP 1 114 FROM deleted)15 GOTO start16 RETURN start:17 DECLARE @GenProcID varchar(38)18 SELECT @GenProcID = dbo.QBM_FGISessionContext('')19 IF20 UPDATE(UID_DialogTable)21 BEGIN22 IF EXISTS(23 SELECT TOP 1 124 FROM inserted i25 LEFT26 OUTER27 JOIN DialogColumn c28 ON i.UID_DialogTable = c.UID_DialogTable AND c.ColumnName = 'XObjectKey'29 WHERE30 c.columnname IS NULL)31 BEGIN32 RAISERROR('#LDS#Non-valid table selected (no XObjectKey exists).|',33 18,34 2)35 WITH nowait36 END37 END38 IF39 UPDATE(PreProcessorCondition)40 BEGIN41 INSERT INTO @ConditionsToCheck(ContentFull)42 SELECT i.PreProcessorCondition43 FROM inserted i44 EXEC QBM_PPrePropCheckSyntax @ConditionsToCheck45 DECLARE @DBQueueElements_01 QBM_YDBQueueRaw46 INSERT INTO @DBQueueElements_01(object,47 subobject,48 genprocid)49 SELECT50 x.uid,51 NULL,52 @GenProcID53 FROM(54 SELECT ao.UID_AttestationObject AS uid55 FROM deleted i56 JOIN AttestationObject ao57 ON ao.UID_AttestationObject = i.UID_AttestationObject58 WHERE59 isnull(i.PreProcessorCondition, N '') <> isnull(ao.PreProcessorCondition, N '')) AS x60 EXEC QBM_PDBQueueInsert_Bulk 'ATT-K-PrepropAttestationObject',61 @DBQueueElements_0162 END63 IF64 UPDATE(IsDeactivatedByPreProcessor)65 BEGIN66 DECLARE @DBQueueElements_02 QBM_YDBQueueRaw67 INSERT INTO @DBQueueElements_02(object,68 subobject,69 genprocid)70 SELECT71 x.uid,72 NULL,73 @GenProcID74 FROM(75 SELECT wp.UID_AttestationWizardParm AS uid76 FROM deleted i77 JOIN AttestationObject ao78 ON ao.UID_AttestationObject = i.UID_AttestationObject79 JOIN AttestationWizardParm wp80 ON wp.UID_AttestationObject = i.UID_AttestationObject81 WHERE82 i.IsDeactivatedByPreProcessor <> ao.IsDeactivatedByPreProcessor) AS x83 EXEC QBM_PDBQueueInsert_Bulk 'ATT-K-PrepropAttestationWizardParm',84 @DBQueueElements_0285 END86 END TRY87 BEGIN CATCH88 EXEC QBM_PSessionErrorAdd DEFAULT89 RAISERROR('',90 18,91 1)92 WITH NOWAIT93 END CATCH94 ende:95 RETURN96END
Open raw exported source
1 create trigger ATT_TUAttestationObject on AttestationObject for Update not for Replication as begin declare @ConditionsToCheck QBM_YParameterList2 BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto start return start: declare @GenProcID varchar3(38) select @GenProcID = dbo.QBM_FGISessionContext('') if update(UID_DialogTable) begin if exists (select top 1 1 from inserted i left outer join DialogColumn4 c on i.UID_DialogTable = c.UID_DialogTable and c.ColumnName = 'XObjectKey' where c.columnname is null ) begin raiserror( '#LDS#Non-valid table selected (no XObjectKey exists).|'5, 18, 2) with nowait end end if update(PreProcessorCondition) begin insert into @ConditionsToCheck (ContentFull) select i.PreProcessorCondition from 6inserted i exec QBM_PPrePropCheckSyntax @ConditionsToCheck declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject7, genprocid) select x.uid, null, @GenProcID from ( select ao.UID_AttestationObject as uid from deleted i join AttestationObject ao on ao.UID_AttestationObject8 = i.UID_AttestationObject where isnull(i.PreProcessorCondition, N'') <> isnull(ao.PreProcessorCondition, N'') ) as x exec QBM_PDBQueueInsert_Bulk 'ATT-K-PrepropAttestationObject'9, @DBQueueElements_01 end if update(IsDeactivatedByPreProcessor) begin declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02 (object10, subobject, genprocid) select x.uid, null, @GenProcID from ( select wp.UID_AttestationWizardParm as uid from deleted i join AttestationObject ao on ao.UID_AttestationObject11 = i.UID_AttestationObject join AttestationWizardParm wp on wp.UID_AttestationObject = i.UID_AttestationObject where i.IsDeactivatedByPreProcessor <> ao.IsDeactivatedByPreProcessor12 ) as x exec QBM_PDBQueueInsert_Bulk 'ATT-K-PrepropAttestationWizardParm', @DBQueueElements_02 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default13 RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: return end 14