Skip to main content
May 14, 2024
Solved

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

  • May 14, 2024
  • 2 replies
  • 0 views

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

 

    Best answer by MarcusH

    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
    May 14, 2024

    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
    May 15, 2024

    That worked. Thanks a lot!