06-21-2023 07:22 AM
Hi Team,
I have tried to make a simple task - if user in not in group I would like to change a certification status to rejected.
This code is in DataQualityEventHandler:
Case Is = BREventOperationType.DataQuality.Certify.FinalizeSetQuestionairreState
Dim sGuid As String = "419eeb3d-eaec-43fc-bc0a-cab5862323f10"
Dim Guid_1 As New Guid(sGuid)
If BRApi.Security.Authorization.IsUserInGroup(si, si.UserName, "GROUP",False) = False Then
BRApi.DataQuality.Process.ExecuteQuestionnaireSignOff(si,si.WorkflowClusterPk,Guid_1,CertSignOffStates.ProfileRejected,"Comments")
End If
It always returns "Certified", but should "Rejected":
Any ideas what am I missing?
06-21-2023 09:02 AM
Hi @Kamila , I think you are over-thinking the process. I would create a Security Group for that Certification Step. In the Workflow Profile editor page assign only those users you want to be able to complete the Certification step, access to do just that. It would look like this:
Note the Prefix WFA - for Workflow Access, WFE for Workflow Execution, and WFC for Certification Signoff. Then you don't need a BR to reject it. You can have users manage the Certification Step using Security Groups assigned here on the Workflow Profile Editor page.
Hope this helps.
06-21-2023 10:00 AM
Hi Mike, thanks for your reply.
I know this method looks like reinventing the wheel, but it's because of the incorrectly set workflow groups. Workflow Execttion Group contain the Certification and I'm not able to separate them (as this require the whole workflow rebuild).
My idea was to do the check in BR, because I can't find another solution
06-21-2023 12:35 PM
I would do the inevitable, unravel the Security groups. Take the Certification Group out of the Execution Group. Assign the WFC_* group explicitly to the Certification SignOff Group on the workflow. Understandably it may be a daunting manual task but the people who inherit the Administration and Maintenance of the application you are building will thank you later.
06-22-2023 08:15 AM
Thanks Mike, but the rebuilt of workflow will be the bigger project in the upcoming months and now I need kind of a workaround like a BR