jayaleck
2 months agoNew Contributor II
Workflow Lock / Unlock Dashboard
Was asked to create a dashboard that gives the HQ admin the ability to lock and unlock Workflow profiles. Found bits and parts to use the user POV and descendants. Unlock descendants isn't working bu...
- 5 days ago
Figured it out, combination of the WorkflowStatus Method data adapter, BI Viewer and combo box. Here's the unlock code
#Region "btn_unlock_wfPOV"If args.FunctionName.XFEqualsIgnoreCase("UnlockwfPOV") ThenDim wfName As String = args.NameValuePairs("wfName")Dim wfChannelId As Guid = guid.EmptyDim wfClusterPk = BRAPi.Workflow.General.GetWorkflowUnitClusterPk(si,wfName,ScenarioForStatus, WFTimeForStatus)Dim profileInfos As List(Of WorkflowProfileInfo) = BRApi.Workflow.Metadata.GetRelatives(si, BRAPI.Workflow.General.GetWorkflowUnitClusterPk _(si,wfName,ScenarioForStatus, WFTimeForStatus),WorkflowProfileRelativeTypes.Descendants,WorkflowProfileTypes.AllProfiles)For Each profileInfo In profileInfosBRApi.Workflow.Locking.UnlockWorkflowUnit(si, wfClusterPk)BRapi.Workflow.Locking.UnlockWorkflowUnitDescendants(si, wfClusterPk, WorkflowProfileTypes.AllProfiles, wfChannelId)Next'To change the iconsDim selectionResult As New XFSelectionChangedTaskResult()selectionResult.WorkflowWasChangedbyBusinessRule = TrueReturn selectionResultEnd If