Skip to main content
Newcomer
May 14, 2024 1:14 PM UTC
Solved

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

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

 

    MarcusHAnswer
    Expert
    May 14, 2024 5:18 PM UTC

    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

     

    2 replies

    MarcusHAnswer
    Expert
    May 14, 2024 5:18 PM UTC

    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

     

    RizilAuthor
    Newcomer
    May 15, 2024 8:19 AM UTC

    That worked. Thanks a lot!