Parameters
| iiRoleID | input | integer | |
| iiResourceID | input | integer | |
| iiSODCategory1ID | input | integer | |
| iiSODCategory2ID | input | integer | |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/bsodviolationrule1.p)
if viBSODLogID = 0
then do:
<I-1 {bFcAddToTransaction
&CLASS = "BSODLog"}>
end.
for each tSODViolation1 where
(tSODViolation1.Role_ID = iiRoleID or iiRoleID = 0) and
(((tSODViolation1.SODCategory1_ID = iiSODCategory1ID or iiSODCategory1ID = 0) and
(tSODViolation1.SODCategory2_ID = iiSODCategory2ID or iiSODCategory2ID = 0)) or
((tSODViolation1.SODCategory2_ID = iiSODCategory1ID or iiSODCategory1ID = 0) and
(tSODViolation1.SODCategory1_ID = iiSODCategory2ID or iiSODCategory2ID = 0))) and
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:
if iiResourceID = 0
or iiResourceID = ?
then tSODViolation1.tc_Status = "D".
else if iiResourceID = bVRResource1.Resource_ID
then if can-find (first tSODViolation1R where
tSODViolation1R.tc_ParentRowid = tSODViolation1.tc_Rowid and
tSODViolation1R.SODViolation1RCategory = 1 and
tSODViolation1R.tc_Rowid <> bVRResource1.tc_Rowid and
tSODViolation1R.tc_Status <> "D")
then bVRResource1.tc_Status = "D".
else tSODViolation1.tc_Status = "D".
else if iiResourceID = bVRResource2.Resource_ID
then if can-find (first tSODViolation1R where
tSODViolation1R.tc_ParentRowid = tSODViolation1.tc_Rowid and
tSODViolation1R.SODViolation1RCategory = 2 and
tSODViolation1R.tc_Rowid <> bVRResource2.tc_Rowid and
tSODViolation1R.tc_Status <> "D")
then bVRResource2.tc_Status = "D".
else tSODViolation1.tc_Status = "D".
end.