dbo.QER_P04F128DC257D2B3C236MAIL_

SQL_STORED_PROCEDURE

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

Open formatted source/search result

Parameters

NameTypeOutput
@GenProcIDToUsevarcharno
@PWOHelperPWO_NewQER_YPWOHelperno
@PWOToCheckQER_YPWOBufferForHelperno
@DecisionLevelToUseintno
@UID_PWOvarcharno

Referenced objects

SchemaObjectColumn/minorClass
personOBJECT_OR_COLUMN
pwodecisionruleOBJECT_OR_COLUMN
PWOHelperPWOOBJECT_OR_COLUMN
QBM_PJobCreate_HOFireEvent_LOBJECT_OR_COLUMN
QBM_PSessionContextSetOBJECT_OR_COLUMN
QBM_YParameterListTYPE
QER_YPWOBufferForHelperTYPE
QER_YPWOHelperTYPE
QERWorkingStepOBJECT_OR_COLUMN
dboQBM_FGIConfigparmValueOBJECT_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_P04F128DC257D2B3C236MAIL_( @GenProcIDToUse varchar(38) , @PWOHelperPWO_New QER_YPWOHelper readonly , @PWOToCheck QER_YPWOBufferForHelper
2 readonly , @DecisionLevelToUse int , @UID_PWO varchar(38) ) with execute as 'dbo' as begin declare @ObjectKeysToFire QBM_YParameterList declare @WhereclauseForMail
3 nvarchar(max) declare @StartTemplateAt datetime = DATEADD(ss, 15, getutcdate()) exec QBM_PSessionContextSet 'GenProcID', @GenProcIDToUse  insert into 
4@ObjectKeysToFire (Parameter1) select h.XObjectKey from @PWOHelperPWO_New n join PWOHelperPWO h with (readpast) on n.UID_PrimaryKey = h.uid_PWOHelperPWO
5 and h.decision = '' join @PWOToCheck pwo on h.uid_personwantsorg = pwo.uid_personwantsorg and h.levelnumber = pwo.decisionlevel and pwo.GenProcid = @GenProcIDToUse
6 and pwo.decisionlevel = @DecisionLevelToUse join QERWorkingStep s on h.UID_QERWorkingStep = s.UID_QERWorkingStep and (  s.UID_DialogRichMailInsert > ' '
7 or dbo.QBM_FGIConfigparmValue('QER\Person\Starling\UseApprovalAnywhere') > ' ' ) join pwodecisionrule r on s.UID_PWODecisionRule = r.UID_PWODecisionRule
8 and r.UID_Task is null join person p on h.uid_personhead = p.uid_person and p.defaultemailaddress > ' ' where n.istoinsert = 1  and h.RulerLevel < 2 and
9 pwo.UID_PersonWantsOrg = @UID_PWO union  select h.XObjectKey from PWOHelperPWO h with (readpast) join @PWOToCheck pwo on h.uid_personwantsorg = pwo.uid_personwantsorg
10 and h.levelnumber = pwo.decisionlevel and pwo.GenProcid = @GenProcIDToUse and pwo.decisionlevel = @DecisionLevelToUse and h.levelnumber = pwo.decisionlevel
11 and h.decision = '' join QERWorkingStep s on h.UID_QERWorkingStep = s.UID_QERWorkingStep and (  s.UID_DialogRichMailInsert > ' ' or dbo.QBM_FGIConfigparmValue
12('QER\Person\Starling\UseApprovalAnywhere') > ' ' ) join pwodecisionrule r on s.UID_PWODecisionRule = r.UID_PWODecisionRule and r.UID_Task is null join
13 person p on h.uid_personhead = p.uid_person and p.defaultemailaddress > ' ' where pwo.isNewDecisionLevel = 1  and h.RulerLevel < 2 and pwo.UID_PersonWantsOrg
14 = @UID_PWO  select @WhereclauseForMail = concat('exists(select top 1 1 
15													from personwantsorg pwo 
16													where pwo.uid_personwantsorg  = '''
17 , @UID_PWO , ''' 
18													and pwo.decisionlevel = ' , str(@DecisionLevelToUse) , ' 
19													and pwo.OrderState in (''OrderProduct'', ''OrderProlongate'', ''OrderUnsubscribe'')
20												)'
21 ) exec QBM_PJobCreate_HOFireEvent_L 'PWOHelperPWO', @ObjectKeysToFire, 'DecisionRequired', @GenProcIDToUse , @priority = 10  , @CheckForExisting = 1  
22, @StartAt = @StartTemplateAt , @whereclauseAdditional = @WhereclauseForMail , @AdditionalObjectKeysAffected = DEFAULT end 
23

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:37.967

creates object-layer jobs via QBM_PJobCreate* fires object-layer event via HOFireEvent uses session context values

Summary: calls as, QBM_PSessionContextSet, QBM_PJobCreate_HOFireEvent_L; writes INSERT into; reads/joins PWOHelperPWO, QERWorkingStep, pwodecisionrule, person, personwantsorg; uses config QER\Person\Starling\UseApprovalAnywhere; uses session context GenProcID

Declared parameters

ParameterTypeDirection
@GenProcIDToUsevarchar(38)input
@PWOHelperPWO_Newqer_ypwohelperinput
@PWOToCheckqer_ypwobufferforhelperinput
@DecisionLevelToUseintinput
@UID_PWOvarchar(38)input

DML targets

INSERT into

Config/session

Config: QER\Person\Starling\UseApprovalAnywhere

Session: GenProcID

DBQueue/tasks

None extracted.

Temp tables / referenced variables

Temp: None extracted.

Variables: @GenProcIDToUse @PWOHelperPWO_New @PWOToCheck @DecisionLevelToUse @UID_PWO @ObjectKeysToFire @WhereclauseForMail @StartTemplateAt @priority @CheckForExisting @StartAt @whereclauseAdditional @AdditionalObjectKeysAffected

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.

Referencing objectRelationEvidence
dbo.QER_PITShopHelperFill_bulkSQL expression dependencyOBJECT_OR_COLUMN
dbo.QER_PITShopHelperFill_bulksource text referenceinserts DBQueue tasks, uses session context values, has TRY/CATCH error handling