dbo.QER_ZITShopOrderAbort
Stored ProcedureSQL_STORED_PROCEDURESandbox DB
Interpretation
- Database routine. Review parameters, called procedures, DBQueue inserts, and QBM_PJobCreate helper calls before assuming side effects.
- Object-layer bridge detected through QBM_PJobCreate helper usage.
Relations
- HOCallMethod -> PersonWantsOrg.@AbortMethod at line 11
- References QBM_PJobCreate*
- References QBM_PJobCreate_HOCallMethod*
Typed Edges
- references source dbo.QBM_FCVStringToBit source text reference
- references source dbo.QBM_FCVStringTrimLDSPrefix source text reference
- references source dbo.QBM_FGIConfigparmValue source text reference
- references source dbo.QER_FGIGenProcIDForPWO source text reference
- references source dbo.QBM_PJobCreate source text reference
- references source dbo.QBM_PJobCreate_HOCallMethod source text reference
- references source dbo.QBM_PSessionErrorAdd source text reference
References
- dbo.QBM_FCVStringToBit
- dbo.QBM_FCVStringTrimLDSPrefix
- dbo.QBM_FGIConfigparmValue
- dbo.QER_FGIGenProcIDForPWO
- dbo.QBM_PJobCreate
- dbo.QBM_PJobCreate_HOCallMethod
- dbo.QBM_PSessionErrorAdd
Referenced By
- No direct source references extracted.
Complete Source
1CREATE PROCEDURE QER_ZITShopOrderAbort(2 @SlotNumber int3)4AS5BEGIN6 DECLARE @uid_personwantsorg varchar(38)7 DECLARE @GenProcID varchar(38)8 DECLARE @CfgUseGenProcID BIT = dbo.QBM_FCVStringToBit(dbo.QBM_FGIConfigparmValue('Common\ProcessState\UseGenProcIDFromPWO'))9 DECLARE @cond nvarchar(1000)10 DECLARE @BasisObjectKey varchar(138)11 DECLARE @AbortMethod nvarchar(64)12 DECLARE @reason nvarchar(1000)13 DECLARE @ElementBuffer QBM_YCursorBuffer14 DECLARE @ElementCount int15 DECLARE @ElementIndex int16 DECLARE @DBQueueCurrent QBM_YDBQueueCurrent17 BEGIN TRY18 INSERT INTO @DBQueueCurrent(UID_DialogDBQueue,19 UID_Parameter,20 UID_SubParameter,21 GenProcID)22 SELECT23 UID_DialogDBQueue,24 UID_Parameter,25 UID_SubParameter,26 GenProcID27 FROM QBMDBQueueCurrent cu28 WITH(readpast)29 WHERE30 cu.SlotNumber = @SlotNumber31 IF @@rowcount = 032 BEGIN33 GOTO EndLabel34 END35 INSERT INTO @ElementBuffer(UID1,36 UID2,37 ObjectKey1,38 Ident1)39 SELECT40 pwo.uid_Personwantsorg,41 dbo.QER_FGIGenProcIDForPWO(pwo.GenProcID,42 p.GenProcID,43 @CfgUseGenProcID) AS GenProcID,44 PWO.XObjectKey,45 'Abort'46 FROM @DBQueueCurrent p47 JOIN personwantsorg pwo48 ON p.uid_parameter = pwo.uid_personwantsorg49 SELECT @ElementCount = @@ROWCOUNT50 SELECT @ElementIndex = 151 WHILE @ElementIndex <= @ElementCount52 BEGIN53 SELECT54 TOP 1 @uid_personwantsorg = bu.UID1,55 @GenProcID = bu.UID2,56 @BasisObjectkey = bu.ObjectKey1,57 @AbortMethod = bu.Ident158 FROM @ElementBuffer bu59 WHERE60 bu.ElementIndex = @ElementIndex61 SELECT @cond = N 'uid_personwantsorg = ''' + rtrim(@uid_personwantsorg) + N ''''62 SELECT63 @reason = dbo.QBM_FCVStringTrimLDSPrefix('#LDS#Automatic system approval: Assigned Element was deleted or workflow has changed.|')64 EXEC QBM_PJobCreate_HOCallMethod 'PersonWantsOrg',65 @cond,66 @save = 1,67 @MethodName = @AbortMethod,68 @GenProcID = @GenProcID,69 @ObjectKeysAffected = DEFAULT,70 @param1 = @reason,71 @IsToFreezeOnError = 1,72 @Retries = 3,73 @checkForExisting = 1,74 @WhereClauseAdditional = ' OrderState in (''Assigned'', ''Granted'', ''New'', ''OrderProduct'', ''OrderProlongate'', ''OrderUnsubscribe'', ''Waiting'')'75 ,76 @BasisObjectKey = @BasisObjectKey77 SELECT @ElementIndex += 178 END79 END TRY80 BEGIN CATCH81 EXEC QBM_PSessionErrorAdd DEFAULT82 RAISERROR('',83 18,84 1)85 WITH NOWAIT86 END CATCH87 endLabel:88 RETURN89END
Open raw exported source
1 create procedure QER_ZITShopOrderAbort (@SlotNumber int) as begin declare @uid_personwantsorg varchar(38) declare @GenProcID varchar(38) 2declare @CfgUseGenProcID bit = dbo.QBM_FCVStringToBit(dbo.QBM_FGIConfigparmValue('Common\ProcessState\UseGenProcIDFromPWO')) declare @cond nvarchar(10003) declare @BasisObjectKey varchar(138) declare @AbortMethod nvarchar(64) declare @reason nvarchar(1000) declare @ElementBuffer QBM_YCursorBuffer declare4 @ElementCount int declare @ElementIndex int declare @DBQueueCurrent QBM_YDBQueueCurrent BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter5, UID_SubParameter, GenProcID) select UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber6 = @SlotNumber if @@rowcount = 0 begin goto EndLabel end insert into @ElementBuffer (UID1, UID2, ObjectKey1, Ident1) select pwo.uid_Personwantsorg , dbo.QER_FGIGenProcIDForPWO7(pwo.GenProcID, p.GenProcID, @CfgUseGenProcID) as GenProcID , PWO.XObjectKey , 'Abort' from @DBQueueCurrent p join personwantsorg pwo on p.uid_parameter8 = pwo.uid_personwantsorg select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @uid_personwantsorg9 = bu.UID1 , @GenProcID = bu.UID2 , @BasisObjectkey = bu.ObjectKey1 , @AbortMethod = bu.Ident1 from @ElementBuffer bu where bu.ElementIndex = @ElementIndex10 select @cond = N'uid_personwantsorg = ''' + rtrim(@uid_personwantsorg) + N'''' select @reason = dbo.QBM_FCVStringTrimLDSPrefix('#LDS#Automatic system approval: Assigned Element was deleted or workflow has changed.|'11) exec QBM_PJobCreate_HOCallMethod 'PersonWantsOrg', @cond, @save = 1, @MethodName = @AbortMethod , @GenProcID = @GenProcID , @ObjectKeysAffected = DEFAULT12 , @param1 = @reason , @IsToFreezeOnError = 1 , @Retries = 3 , @checkForExisting = 1 , @WhereClauseAdditional = ' OrderState in (''Assigned'', ''Granted'', ''New'', ''OrderProduct'', ''OrderProlongate'', ''OrderUnsubscribe'', ''Waiting'')'13 , @BasisObjectKey = @BasisObjectKey select @ElementIndex += 1 end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT14 END CATCH endLabel: return end 15