Forum Discussion
RyanDiehl
3 years agoNew Contributor III
Help with GetUsersInWorkflowGroup function
I'm trying to lookup the users in a workflow execution group so I can e-mail them when the harvest batch process runs successfully. Below is the code I'm using to try and lookup the users within a wo...
- 3 years ago
workflowGroupType corresponds to the workflow profile attribute index, not too sure why 1250 is erroring out on you, as that's the exact index for the Workflow Execution Group.
Also, probably better to set your text1Filter to `String.Empty` or `""` instead of `Nothing` since the function is expecting to parse a string, not an object.
Maybe try different groups to check.
Also for reference:
Certification Sign Off Group = 16100
Workflow Execution Group = 1250
epadua
3 years agoNew Contributor II
workflowGroupType corresponds to the workflow profile attribute index, not too sure why 1250 is erroring out on you, as that's the exact index for the Workflow Execution Group.
Also, probably better to set your text1Filter to `String.Empty` or `""` instead of `Nothing` since the function is expecting to parse a string, not an object.
Maybe try different groups to check.
Also for reference:
Certification Sign Off Group = 16100
Workflow Execution Group = 1250
- RyanDiehl3 years agoNew Contributor III
Thanks Eric! You are Awesome!
I had found the same 1250 as the number it should be and that's what led me down that path. For those looking for the different "WorkflowGroupType" codes, below is where they are.
The change from "Nothing" to "String.Empty" did the trick!
Also for those interested, here is the code that works:
Dim userList As List(Of UserInfo) = BRApi.Workflow.General.GetUsersInWorkflowGroup(si,wfPK,1250, False,String.Empty)
- Nikpowar972 years agoContributor
Thanks for the solution above I was looking for the specific Ids here for the workflowGroupType
Though I was looking for some alternate solution here to see the Session user is part of the WF Execution Group for Table views Security.
BRApi.Security.Admin.GetGroupInfoEx(si,BrApi.Workflow.Metadata.GetProfile(si,si.WorkflowClusterPk.ProfileKey).GetAttributeValue(-1,1250).XFConvertToGuid).GroupInfo.Group.Name)
OR
BRApi.Workflow.General.GetUserWorkflowInitInfo(si).WorkflowViewItems(0).UserIsWorkflowExecutorPosting this may be can help someone lookup for the specific use case. 🙂
PS: this is not a solution for the above question but just a similar use case that can help. 🙂
Related Content
- 1 year ago
- 2 years ago
- 4 years ago