Description
last phase of delete of violations
Parameters
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/bsodviolationrule2.p)
for each tSODViolation2 where tSODViolation2.tc_Status = "D" on error undo, throw:
for each tSODViolation2R where
tSODViolation2R.tc_ParentRowid = tSODViolation2.tc_Rowid:
tSODViolation2R.tc_Status = "".
end.
assign vcUsr = ""
vcDomain = ""
vcCompany = ""
vcRole1 = ""
vcRole2 = ""
vcCat1 = ""
vcCat2 = ""
vcLevel = "".
for first Usr fields (Usr_ID UsrLogin) no-lock where
Usr.Usr_ID = tSODViolation2.Usr_ID:
vcUsr = Usr.UsrLogin.
end.
for first Domains fields (Domain_ID DomainCode) no-lock where
Domains.Domain_ID = tSODViolation2.Domain_ID:
vcDomain = Domains.DomainCode.
end.
for first Company fields (Company_ID CompanyCode) no-lock where
Company.Company_ID = tSODViolation2.Company_ID:
vcCompany = Company.CompanyCode.
end.
for first Role fields (Role_ID RoleName) no-lock where
Role.Role_ID = tSODViolation2.Role1_ID:
vcRole1 = Role.RoleName.
end.
for first Role fields (Role_ID RoleName) no-lock where
Role.Role_ID = tSODViolation2.Role2_ID:
vcRole2 = Role.RoleName.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation2.SODCategory1_ID:
vcCat1 = SODCategory.SODCategoryCode.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation2.SODCategory2_ID:
vcCat2 = SODCategory.SODCategoryCode.
end.
for first SODExclusion fields (SODCategory1_ID SODCategory2_ID SODExclusionLevel) no-lock where
SODExclusion.SODCategory1_ID = tSODViolation2.SODCategory1_ID and
SODExclusion.SODCategory2_ID = tSODViolation2.SODCategory2_ID:
vcLevel = SODExclusion.SODExclusionLevel.
end.
for each bVRResource1 where
bVRResource1.tc_ParentRowid = tSODViolation2.tc_Rowid and
bVRResource1.SODViolation2RCategory = 1,
each bVRResource2 where
bVRResource2.tc_ParentRowid = tSODViolation2.tc_Rowid and
bVRResource2.SODViolation2RCategory = 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-53 run AddLogEntry
(input {&SODLOG-RULE2} (icRule),
input {&SODLOG-STATUS-CORRECTION} (icStatus),
input vcUsr (icUsrLogin),
input vcDomain (icDomainCode),
input vcCompany (icCompanyCode),
input vcRole1 (icRole1Name),
input vcRole2 (icRole2Name),
input vcCat1 (icCategory1Code),
input vcCat2 (icCategory2Code),
input vcResource1 (icResource1URI),
input vcResource2 (icResource2URI),
input vcLevel (icExclusionLevel)) in BSODLog>
end.
end.
for each tSODViolation2 where tSODViolation2.tc_Status <> "D",
each bVRResource1 where
bVRResource1.tc_ParentRowid = tSODViolation2.tc_Rowid and
bVRResource1.SODViolation2RCategory = 1 and
bVRResource1.tc_Status = "D",
each bVRResource2 where
bVRResource2.tc_ParentRowid = tSODViolation2.tc_Rowid and
bVRResource2.SODViolation2RCategory = 2 and
bVRResource2.tc_Status <> "D"
on error undo, throw:
assign vcUsr = ""
vcDomain = ""
vcCompany = ""
vcRole1 = ""
vcRole2 = ""
vcCat1 = ""
vcCat2 = ""
vcLevel = ""
vcResource1 = ""
vcResource2 = "".
for first Usr fields (Usr_ID UsrLogin) no-lock where
Usr.Usr_ID = tSODViolation2.Usr_ID:
vcUsr = Usr.UsrLogin.
end.
for first Domains fields (Domain_ID DomainCode) no-lock where
Domains.Domain_ID = tSODViolation2.Domain_ID:
vcDomain = Domains.DomainCode.
end.
for first Company fields (Company_ID CompanyCode) no-lock where
Company.Company_ID = tSODViolation2.Company_ID:
vcCompany = Company.CompanyCode.
end.
for first Role fields (Role_ID RoleName) no-lock where
Role.Role_ID = tSODViolation2.Role1_ID:
vcRole1 = Role.RoleName.
end.
for first Role fields (Role_ID RoleName) no-lock where
Role.Role_ID = tSODViolation2.Role2_ID:
vcRole2 = Role.RoleName.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation2.SODCategory1_ID:
vcCat1 = SODCategory.SODCategoryCode.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation2.SODCategory2_ID:
vcCat2 = SODCategory.SODCategoryCode.
end.
for first SODExclusion fields (SODCategory1_ID SODCategory2_ID SODExclusionLevel) no-lock where
SODExclusion.SODCategory1_ID = tSODViolation2.SODCategory1_ID and
SODExclusion.SODCategory2_ID = tSODViolation2.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-79 run AddLogEntry
(input {&SODLOG-RULE2} (icRule),
input {&SODLOG-STATUS-CORRECTION} (icStatus),
input vcUsr (icUsrLogin),
input vcDomain (icDomainCode),
input vcCompany (icCompanyCode),
input vcRole1 (icRole1Name),
input vcRole2 (icRole2Name),
input vcCat1 (icCategory1Code),
input vcCat2 (icCategory2Code),
input vcResource1 (icResource1URI),
input vcResource2 (icResource2URI),
input vcLevel (icExclusionLevel)) in BSODLog>
end.
for each tSODViolation2 where tSODViolation2.tc_Status <> "D",
each bVRResource1 where
bVRResource1.tc_ParentRowid = tSODViolation2.tc_Rowid and
bVRResource1.SODViolation2RCategory = 1 and
bVRResource1.tc_Status <> "D",
each bVRResource2 where
bVRResource2.tc_ParentRowid = tSODViolation2.tc_Rowid and
bVRResource2.SODViolation2RCategory = 2 and
bVRResource2.tc_Status = "D"
on error undo, throw:
assign vcUsr = ""
vcDomain = ""
vcCompany = ""
vcRole1 = ""
vcRole2 = ""
vcCat1 = ""
vcCat2 = ""
vcLevel = ""
vcResource1 = ""
vcResource2 = "".
for first Usr fields (Usr_ID UsrLogin) no-lock where
Usr.Usr_ID = tSODViolation2.Usr_ID:
vcUsr = Usr.UsrLogin.
end.
for first Domains fields (Domain_ID DomainCode) no-lock where
Domains.Domain_ID = tSODViolation2.Domain_ID:
vcDomain = Domains.DomainCode.
end.
for first Company fields (Company_ID CompanyCode) no-lock where
Company.Company_ID = tSODViolation2.Company_ID:
vcCompany = Company.CompanyCode.
end.
for first Role fields (Role_ID RoleName) no-lock where
Role.Role_ID = tSODViolation2.Role1_ID:
vcRole1 = Role.RoleName.
end.
for first Role fields (Role_ID RoleName) no-lock where
Role.Role_ID = tSODViolation2.Role2_ID:
vcRole2 = Role.RoleName.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation2.SODCategory1_ID:
vcCat1 = SODCategory.SODCategoryCode.
end.
for first SODCategory fields (SODCategory_ID SODCategoryCode) no-lock where
SODCategory.SODCategory_ID = tSODViolation2.SODCategory2_ID:
vcCat2 = SODCategory.SODCategoryCode.
end.
for first SODExclusion fields (SODCategory1_ID SODCategory2_ID SODExclusionLevel) no-lock where
SODExclusion.SODCategory1_ID = tSODViolation2.SODCategory1_ID and
SODExclusion.SODCategory2_ID = tSODViolation2.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-93 run AddLogEntry
(input {&SODLOG-RULE2} (icRule),
input {&SODLOG-STATUS-CORRECTION} (icStatus),
input vcUsr (icUsrLogin),
input vcDomain (icDomainCode),
input vcCompany (icCompanyCode),
input vcRole1 (icRole1Name),
input vcRole2 (icRole2Name),
input vcCat1 (icCategory1Code),
input vcCat2 (icCategory2Code),
input vcResource1 (icResource1URI),
input vcResource2 (icResource2URI),
input vcLevel (icExclusionLevel)) in BSODLog>
end.
if viBSODLog7ID <> 0
then do:
<I-31 {bFcCloseInstance
&CLASS = "BSODLog"}>
viBSODLog7ID = 0.
end.
<M-1 run ValidateBC (output viFcReturnSuper (oiReturnStatus)) in BSODViolationRule2>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
<M-2 run AdditionalUpdates (output viFcReturnSuper (oiReturnStatus)) in BSODViolationRule2>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
<M-3 run DataSave (output viFcReturnSuper (oiReturnStatus)) in BSODViolationRule2>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.