Getting Journal Post Group from Workflow Profile Properties Using JournalsEventHandler Business rule

Rizil
New Contributor

I am trying to get the Journal Post Group from Workflow Profile Properties Using JournalsEventHandler Business rule. 
Does anyone have done this before? Is it possible to get the Journal Post Group from the Workflow Profile?

Rizil_0-1715692431754.png

 

1 ACCEPTED SOLUTION

MarcusH
Contributor III

Golfstream has an example of getting the Approval security group. I have edited it but not tested but it should point you in the right direction:

Dim scenarioTypeId as Integer = BRApi.Workflow.General.GetScenarioTypeId(si, si.WorkflowClusterPk)
Dim currentProfile as WorkflowProfileInfo = BRApi.Workflow.Metadata.GetProfile(si, wfClusterPk.ProfileKey)
Dim workflowPostGroupKey as Guid = New Guid(currentProfile.GetAttributeValue(scenarioTypeId, SharedConstants.WorkflowProfileAttributeIndexes.JournalPostGroup))
Dim objGroupInfoEx As GroupInfoEx = BRApi.Security.Admin.GetGroupInfoEx(si, workflowPostGroupKey)
Dim jPostGroup as String = objGroupInfoEx.GroupInfo

 

View solution in original post

2 REPLIES 2

MarcusH
Contributor III

Golfstream has an example of getting the Approval security group. I have edited it but not tested but it should point you in the right direction:

Dim scenarioTypeId as Integer = BRApi.Workflow.General.GetScenarioTypeId(si, si.WorkflowClusterPk)
Dim currentProfile as WorkflowProfileInfo = BRApi.Workflow.Metadata.GetProfile(si, wfClusterPk.ProfileKey)
Dim workflowPostGroupKey as Guid = New Guid(currentProfile.GetAttributeValue(scenarioTypeId, SharedConstants.WorkflowProfileAttributeIndexes.JournalPostGroup))
Dim objGroupInfoEx As GroupInfoEx = BRApi.Security.Admin.GetGroupInfoEx(si, workflowPostGroupKey)
Dim jPostGroup as String = objGroupInfoEx.GroupInfo

 

Rizil
New Contributor

That worked. Thanks a lot!