Back to OIM Explorer

dbo.QER_TUPWODecisionSubmethod

Database TriggerSQL_TRIGGERSandbox DB

Database Trigger on PWODecisionSubMethod. Bulk DBQueue insert -> QER-K-ITSHOPOrder-RESET / QER_ZITShopOrderReset at line 8; Bulk DBQueue insert -> QER-K-ITSHOPOrder-ABORT / QER_ZITShopOrderAbort at line 8; Bulk DBQueue insert -> QER-K-ShoppingRack-All / QER_ZITShopCheckStructure at line 8; Bulk DBQueue insert -> QER-K-ShoppingRack-All / QER_ZITShopCheckStructure at line 13

Source: sandbox-db sys.sql_modules

Source size: 2.100 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 -> QER-K-ITSHOPOrder-RESET / QER_ZITShopOrderReset at line 8
  • Bulk DBQueue insert -> QER-K-ITSHOPOrder-ABORT / QER_ZITShopOrderAbort at line 8
  • Bulk DBQueue insert -> QER-K-ShoppingRack-All / QER_ZITShopCheckStructure at line 8
  • Bulk DBQueue insert -> QER-K-ShoppingRack-All / QER_ZITShopCheckStructure at line 13
  • References QBM_PDBQueueInsert_Bulk
  • Trigger parent table: PWODecisionSubMethod

Typed Edges

  • queues DBQueue task QER_ZITShopOrderReset at line 8 Bulk DBQueue insert -> QER-K-ITSHOPOrder-RESET / QER_ZITShopOrderReset at line 8
  • queues DBQueue task QER_ZITShopOrderAbort at line 8 Bulk DBQueue insert -> QER-K-ITSHOPOrder-ABORT / QER_ZITShopOrderAbort at line 8
  • queues DBQueue task QER_ZITShopCheckStructure at line 8 Bulk DBQueue insert -> QER-K-ShoppingRack-All / QER_ZITShopCheckStructure at line 8
  • queues DBQueue task QER_ZITShopCheckStructure at line 13 Bulk DBQueue insert -> QER-K-ShoppingRack-All / QER_ZITShopCheckStructure at line 13
  • trigger on table PWODecisionSubMethod Trigger parent table: PWODecisionSubMethod
  • references source dbo.QBM_FGIConfigparmValue source text reference
  • 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

SQL84 lines
1CREATE trigger QER_TUPWODecisionSubmethod2  ON PWODecisionSubmethod FOR3UPDATE NOT FOR Replication4AS5BEGIN6  DECLARE @QER_ITShop_OnWorkflowUpdate varchar(16)7  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(RevisionNumber)21    BEGIN22      SELECT23        @QER_ITShop_OnWorkflowUpdate = dbo.QBM_FGIConfigparmValue('QER\ITShop\OnWorkflowUpdate')24      IF @QER_ITShop_OnWorkflowUpdate IN('RESET',25      'ABORT')26      BEGIN27        DECLARE @DBQueueElements_01 QBM_YDBQueueRaw28        INSERT INTO @DBQueueElements_01(Object,29        SubObject,30        GenProcID)31        SELECT32          x.uid,33          NULL,34          @GenProcID35        FROM(36        SELECT pwo.UID_PersonWantsOrg AS uid37        FROM PWODecisionSubmethod sm38        JOIN deleted d39          ON sm.UID_PWODecisionSubMethod = d.UID_PWODecisionSubMethod AND sm.RevisionNumber <> d.RevisionNumber40        JOIN QERWorkingMethod wm41          ON wm.UID_PWODecisionSubMethod = sm.UID_PWODecisionSubMethod42        JOIN PersonWantsOrg pwo43          ON pwo.UID_QERWorkingMethod = wm.UID_QERWorkingMethod) AS x44        IF @QER_ITShop_OnWorkflowUpdate = 'RESET'45        BEGIN46          EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ITSHOPOrder-RESET',47            @DBQueueElements_0148        END49        IF @QER_ITShop_OnWorkflowUpdate = 'ABORT'50        BEGIN51          EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ITSHOPOrder-ABORT',52            @DBQueueElements_0153        END54      END55      DECLARE @DBQueueElements_02 QBM_YDBQueueRaw56      INSERT INTO @DBQueueElements_02(Object,57      SubObject,58      GenProcID)59      SELECT60        DISTINCT ohm.UID_Org,61        NULL,62        @GenProcID63      FROM PWODecisionSubMethod s64      JOIN deleted d65        ON s.UID_PWODecisionSubMethod = d.UID_PWODecisionSubMethod66      JOIN PWODecisionMethod m67        ON m.UID_SubMethodOrderProduct = s.UID_PWODecisionSubMethod OR m.UID_SubMethodOrderProlongate = s.UID_PWODecisionSubMethod OR m.UID_SubMethodOrderUnsubscribe68      = s.UID_PWODecisionSubMethod69      JOIN BaseTreeHasPWODecisionMethod ohm70        ON m.UID_PWODecisionMethod = ohm.uid_PWODecisionmethod71      EXEC QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRack-All',72        @DBQueueElements_0273    END74  END TRY75  BEGIN CATCH76    EXEC QBM_PSessionErrorAdd DEFAULT77    RAISERROR('',78    18,79    1)80      WITH NOWAIT81  END CATCH82  ende:83  RETURN84END
Open raw exported source
SQL ยท Raw15 lines
1    create   trigger QER_TUPWODecisionSubmethod on PWODecisionSubmethod for Update not for Replication as begin  declare @QER_ITShop_OnWorkflowUpdate2 varchar(16) 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 @GenProcID3 varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('')  if update(RevisionNumber) begin select @QER_ITShop_OnWorkflowUpdate = dbo.QBM_FGIConfigparmValue4('QER\ITShop\OnWorkflowUpdate') if @QER_ITShop_OnWorkflowUpdate in ('RESET', 'ABORT') begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_015(Object, SubObject, GenProcID) select x.uid, null, @GenProcID from ( select pwo.UID_PersonWantsOrg as uid from PWODecisionSubmethod sm join deleted d on6 sm.UID_PWODecisionSubMethod = d.UID_PWODecisionSubMethod and sm.RevisionNumber <> d.RevisionNumber join QERWorkingMethod wm on wm.UID_PWODecisionSubMethod7 = sm.UID_PWODecisionSubMethod join PersonWantsOrg pwo on pwo.UID_QERWorkingMethod = wm.UID_QERWorkingMethod ) as x if @QER_ITShop_OnWorkflowUpdate = 'RESET'8 begin exec QBM_PDBQueueInsert_Bulk 'QER-K-ITSHOPOrder-RESET', @DBQueueElements_01 end if @QER_ITShop_OnWorkflowUpdate = 'ABORT' begin exec QBM_PDBQueueInsert_Bulk9 'QER-K-ITSHOPOrder-ABORT', @DBQueueElements_01 end end   declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02(Object, SubObject10, GenProcID) select distinct ohm.UID_Org, null, @GenProcID from PWODecisionSubMethod s join deleted d on s.UID_PWODecisionSubMethod = d.UID_PWODecisionSubMethod11 join PWODecisionMethod m on m.UID_SubMethodOrderProduct = s.UID_PWODecisionSubMethod or m.UID_SubMethodOrderProlongate = s.UID_PWODecisionSubMethod or12 m.UID_SubMethodOrderUnsubscribe = s.UID_PWODecisionSubMethod join BaseTreeHasPWODecisionMethod ohm on m.UID_PWODecisionMethod = ohm.uid_PWODecisionmethod13 exec QBM_PDBQueueInsert_Bulk 'QER-K-ShoppingRack-All', @DBQueueElements_02 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 1814, 1) WITH NOWAIT END CATCH ende: return end 15