dbo.QER_ZITShopMakeDecisionSB

SQL_STORED_PROCEDURE

Created 2025-06-27T18:01:06.193 · modified 2026-04-14T23:20:38.693 · source: live DB sys.objects/sys.sql_expression_dependencies.

Open formatted source/search result

Parameters

NameTypeOutput
@SlotNumberintno

Referenced objects

SchemaObjectColumn/minorClass
personwantsorgOBJECT_OR_COLUMN
PWOHelperPWOOBJECT_OR_COLUMN
QBM_PJobCreate_HOCallMethodOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_YCursorBufferTYPE
QBMDBQueueCurrentOBJECT_OR_COLUMN
dboQBM_FCVStringToBitOBJECT_OR_COLUMN
dboQBM_FGIConfigparmValueOBJECT_OR_COLUMN
dboQER_FGIGenProcIDForPWOOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

1    create   procedure QER_ZITShopMakeDecisionSB (@SlotNumber int) as begin declare @UID_Personwantsorg varchar(38) declare @GenProcID varchar(38
2) declare @CfgUseGenProcID bit = dbo.QBM_FCVStringToBit(dbo.QBM_FGIConfigparmValue('Common\ProcessState\UseGenProcIDFromPWO')) declare @Reason nvarchar
3(255) declare @cond nvarchar(max) declare @DecisionLevel int declare @BasisObjectKey varchar(138) declare @ElementBuffer QBM_YCursorBuffer declare @ElementCount
4 int declare @ElementIndex int BEGIN TRY insert into @ElementBuffer (UID1  , UID2  , ObjectKey1  , Int1  ) select pwo.uid_personwantsorg , dbo.QER_FGIGenProcIDForPWO
5(pwo.GenProcID, p.GenProcID, @CfgUseGenProcID) as GenProcID , pwo.XObjectKey , pwo.DecisionLevel from QBMDBQueueCurrent p with (readpast) join personwantsorg
6 pwo on p.uid_parameter = pwo.uid_personwantsorg and p.SlotNumber = @SlotNumber join PWOHelperPWO ph on pwo.uid_personwantsorg = ph.uid_personwantsorg 
7and pwo.decisionlevel = ph.levelnumber   where ph.UID_PWODecisionRule = 'QER-PWODecisionRule-SB'   and pwo.OrderState in ('OrderProduct', 'OrderProlongate'
8, 'OrderUnsubscribe') select @ElementCount = @@ROWCOUNT select @ElementIndex = 1 while @ElementIndex <= @ElementCount begin select top 1 @uid_personwantsorg
9 = bu.UID1  , @GenProcID = bu.UID2  , @BasisObjectKey = bu.ObjectKey1  , @DecisionLevel = bu.Int1  from @ElementBuffer bu where bu.ElementIndex = @ElementIndex
10 select @reason = '#LDS#Automatic system approval with method SB: Condition was met.|' select @cond = N'uid_personwantsorg = ''' + rtrim(@uid_personwantsorg
11) + N''' and DecisionLevel = ' + STR(@DecisionLevel)  exec QBM_PJobCreate_HOCallMethod @objecttype = 'personwantsorg' , @whereclause = @cond , @save = 
121 , @MethodName = 'MakeDecision' , @ObjectKeysAffected = DEFAULT , @GenProcID = @GenprocID , @param1 = 'sa' , @param2 = 'True' , @param3 = @reason , @Retries
13 = 3 , @isToFreezeOnError = 1  , @BasisObjectKey = @BasisObjectKey , @checkForExisting = 1  , @WhereClauseAdditional = ' OrderState in(''OrderProduct'', ''OrderProlongate'', ''OrderUnsubscribe'')'
14  select @ElementIndex += 1 end  END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: return end
15 
16

Module relation graph

Loading module relation graph…

Source-derived context

Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.

provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:20:38.693

creates object-layer jobs via QBM_PJobCreate* calls object-layer method via HOCallMethod has TRY/CATCH error handling

Summary: calls QBM_PJobCreate_HOCallMethod, QBM_PSessionErrorAdd; writes INSERT into; reads/joins QBMDBQueueCurrent, personwantsorg, PWOHelperPWO; uses config Common\ProcessState\UseGenProcIDFromPWO

Declared parameters

ParameterTypeDirection
@SlotNumberintinput

DML targets

INSERT into

Config/session

Config: Common\ProcessState\UseGenProcIDFromPWO

Session: None extracted.

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: #LDS #Automatic

Variables: @SlotNumber @UID_Personwantsorg @GenProcID @CfgUseGenProcID @Reason @cond @DecisionLevel @BasisObjectKey @ElementBuffer @ElementCount @ElementIndex @ROWCOUNT @uid_personwantsorg @reason @objecttype @whereclause @save @MethodName @ObjectKeysAffected @GenprocID @param1 @param2 @param3 @Retries @isToFreezeOnError @checkForExisting @WhereClauseAdditional

Referenced by / reverse dependencies

Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.

No reverse dependencies extracted.