Forum Discussion
ChrisBadenhorst
2 years agoNew Contributor II
Thank you Mike,
I unfortunately need to use a BR as there are a few things that need to happen based on the workflow status of the parent profile.
Chris
NicolasArgente
2 years agoValued Contributor
Try that ;
'Check the Workflow status of the parent (We can't calculate plan if the parent is certified)
Dim wfRegParent As WorkflowProfileInfo = BRApi.Workflow.Metadata.GetParent(si, si.WorkflowClusterPk)
Dim wfRegParentPk As New WorkflowUnitClusterPk(wfRegParent.ProfileKey, si.WorkflowClusterPk.ScenarioKey, si.WorkflowClusterPk.TimeKey)
Dim wfRegParentStatus As WorkflowInfo = BRApi.Workflow.Status.GetWorkflowStatus(si, wfRegParentPk, False)
- ChrisBadenhorst2 years agoNew Contributor II
Hi Nic!
Thanks.
It errors on this line if the user does not have access to the Parent Workflow Profile.
Dim wfRegParent As WorkflowProfileInfo = BRApi.Workflow.Metadata.GetParent(si, si.WorkflowClusterPk)
- NicolasArgente2 years agoValued Contributor
Try
BRApi.Workflow.Metadata.GetParent(si, si.WorkflowClusterPk, False)
- ChrisBadenhorst2 years agoNew Contributor II
Hi Nic,
Unfortunately, the GetParent function only accepts two arguments. One being the session info and the other the workflow you are getting the parent for.
Related Content
- 2 years ago