Description
last phase of delete of violations
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/bsodviolationrule1.p)
for each tSODViolation1 where tSODViolation1.tc_Status = "D" on error undo, throw:
for each tSODViolation1R where
tSODViolation1R.tc_ParentRowid = tSODViolation1.tc_Rowid:
tSODViolation1R.tc_Status = "".
end.
assign vcRoleName = ""
vcCat1 = ""
vcCat2 = ""
vcLevel = "".
for first Role fields (Role_ID RoleName) no-lock where
Role.Role_ID = tSODViolation1.Role_ID:
vcRoleName = Role.RoleName.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation1.SODCategory1_ID:
vcCat1 = SODCategory.SODCategoryCode.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation1.SODCategory2_ID:
vcCat2 = SODCategory.SODCategoryCode.
end.
for first SODExclusion fields (SODCategory1_ID SODCategory2_ID SODExclusionLevel) no-lock where
SODExclusion.SODCategory1_ID = tSODViolation1.SODCategory1_ID and
SODExclusion.SODCategory2_ID = tSODViolation1.SODCategory2_ID:
vcLevel = SODExclusion.SODExclusionLevel.
end.
for each bVRResource1 where
bVRResource1.tc_ParentRowid = tSODViolation1.tc_Rowid and
bVRResource1.SODViolation1RCategory = 1,
each bVRResource2 where
bVRResource2.tc_ParentRowid = tSODViolation1.tc_Rowid and
bVRResource2.SODViolation1RCategory = 2
on error undo, throw:
assign vcResource1 = ""
vcResource2 = "".
for first Resources fields (Resource_ID ResourceURI) no-lock where
Resources.Resource_ID = bVRResource1.Resource_ID:
vcResource1 = Resources.ResourceURI.
end.
for first Resources fields (Resource_ID ResourceURI) no-lock where
Resources.Resource_ID = bVRResource2.Resource_ID:
vcResource2 = Resources.ResourceURI.
end.
<M-86 run AddLogEntry
(input {&SODLOG-RULE1} (icRule),
input {&SODLOG-STATUS-CORRECTION} (icStatus),
input '' (icUsrLogin),
input '' (icDomainCode),
input '' (icCompanyCode),
input vcRoleName (icRole1Name),
input '' (icRole2Name),
input vcCat1 (icCategory1Code),
input vcCat2 (icCategory2Code),
input vcResource1 (icResource1URI),
input vcResource2 (icResource2URI),
input vcLevel (icExclusionLevel)) in BSODLog>
end.
end.
for each tSODViolation1 where tSODViolation1.tc_Status <> "D",
each bVRResource1 where
bVRResource1.tc_ParentRowid = tSODViolation1.tc_Rowid and
bVRResource1.SODViolation1RCategory = 1 and
bVRResource1.tc_Status = "D",
each bVRResource2 where
bVRResource2.tc_ParentRowid = tSODViolation1.tc_Rowid and
bVRResource2.SODViolation1RCategory = 2 and
bVRResource2.tc_Status <> "D"
on error undo, throw:
assign vcRoleName = ""
vcCat1 = ""
vcCat2 = ""
vcLevel = ""
vcResource1 = ""
vcResource2 = "".
for first Role fields (Role_ID RoleName) no-lock where
Role.Role_ID = tSODViolation1.Role_ID:
vcRoleName = Role.RoleName.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation1.SODCategory1_ID:
vcCat1 = SODCategory.SODCategoryCode.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation1.SODCategory2_ID:
vcCat2 = SODCategory.SODCategoryCode.
end.
for first SODExclusion fields (SODCategory1_ID SODCategory2_ID SODExclusionLevel) no-lock where
SODExclusion.SODCategory1_ID = tSODViolation1.SODCategory1_ID and
SODExclusion.SODCategory2_ID = tSODViolation1.SODCategory2_ID:
vcLevel = SODExclusion.SODExclusionLevel.
end.
for first Resources fields (Resource_ID ResourceURI) no-lock where
Resources.Resource_ID = bVRResource1.Resource_ID:
vcResource1 = Resources.ResourceURI.
end.
for first Resources fields (Resource_ID ResourceURI) no-lock where
Resources.Resource_ID = bVRResource2.Resource_ID:
vcResource2 = Resources.ResourceURI.
end.
<M-29 run AddLogEntry
(input {&SODLOG-RULE1} (icRule),
input {&SODLOG-STATUS-CORRECTION} (icStatus),
input '' (icUsrLogin),
input '' (icDomainCode),
input '' (icCompanyCode),
input vcRoleName (icRole1Name),
input '' (icRole2Name),
input vcCat1 (icCategory1Code),
input vcCat2 (icCategory2Code),
input vcResource1 (icResource1URI),
input vcResource2 (icResource2URI),
input vcLevel (icExclusionLevel)) in BSODLog>
end.
for each tSODViolation1 where tSODViolation1.tc_Status <> "D",
each bVRResource1 where
bVRResource1.tc_ParentRowid = tSODViolation1.tc_Rowid and
bVRResource1.SODViolation1RCategory = 1 and
bVRResource1.tc_Status <> "D",
each bVRResource2 where
bVRResource2.tc_ParentRowid = tSODViolation1.tc_Rowid and
bVRResource2.SODViolation1RCategory = 2 and
bVRResource2.tc_Status = "D"
on error undo, throw:
assign vcRoleName = ""
vcCat1 = ""
vcCat2 = ""
vcLevel = ""
vcResource1 = ""
vcResource2 = "".
for first Role fields (Role_ID RoleName) no-lock where
Role.Role_ID = tSODViolation1.Role_ID:
vcRoleName = Role.RoleName.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation1.SODCategory1_ID:
vcCat1 = SODCategory.SODCategoryCode.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation1.SODCategory2_ID:
vcCat2 = SODCategory.SODCategoryCode.
end.
for first SODExclusion fields (SODCategory1_ID SODCategory2_ID SODExclusionLevel) no-lock where
SODExclusion.SODCategory1_ID = tSODViolation1.SODCategory1_ID and
SODExclusion.SODCategory2_ID = tSODViolation1.SODCategory2_ID:
vcLevel = SODExclusion.SODExclusionLevel.
end.
for first Resources fields (Resource_ID ResourceURI) no-lock where
Resources.Resource_ID = bVRResource1.Resource_ID:
vcResource1 = Resources.ResourceURI.
end.
for first Resources fields (Resource_ID ResourceURI) no-lock where
Resources.Resource_ID = bVRResource2.Resource_ID:
vcResource2 = Resources.ResourceURI.
end.
<M-75 run AddLogEntry
(input {&SODLOG-RULE1} (icRule),
input {&SODLOG-STATUS-CORRECTION} (icStatus),
input '' (icUsrLogin),
input '' (icDomainCode),
input '' (icCompanyCode),
input vcRoleName (icRole1Name),
input '' (icRole2Name),
input vcCat1 (icCategory1Code),
input vcCat2 (icCategory2Code),
input vcResource1 (icResource1URI),
input vcResource2 (icResource2URI),
input vcLevel (icExclusionLevel)) in BSODLog>
end.
if viBSODLogID <> 0
then do:
<I-91 {bFcCloseInstance
&CLASS = "BSODLog"}>
viBSODLogID = 0.
end.
<M-1 run ValidateBC (output viFcReturnSuper (oiReturnStatus)) in BSODViolationRule1>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
<M-2 run AdditionalUpdates (output viFcReturnSuper (oiReturnStatus)) in BSODViolationRule1>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
<M-3 run DataSave (output viFcReturnSuper (oiReturnStatus)) in BSODViolationRule1>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.