Workflow Completion using Dashboard extender Business Rule
Hi All,
We have multiple Profiles under a workflow and each profile contains multiple forms in it. While executing the business rule through the button from workflow dashboard, It is just completing that particular workflow with forms but not the other workflows which consists of multiple forms.
Below is the code using to complete the workflow. Is there a solution for this issue.
Dim selectionChangedTaskResult As New XFSelectionChangedTaskResult()
Dim wfProfile As String = BRApi.Workflow.Metadata.GetProfile(si, si.WorkflowClusterPk.ProfileKey).Name
Dim scenario As String = ScenarioDimHelper.GetNameFromID(si, si.WorkflowClusterPk.ScenarioKey)
Dim time As String = BRApi.Finance.Time.GetNameFromId(si, si.WorkflowClusterPk.TimeKey)
Dim wfClusterPK As WorkflowUnitClusterPk = BRApi.Workflow.General.GetWorkflowUnitClusterPk(si, wfProfile, scenario, time)
BRApi.Workflow.Status.SetWorkflowStatus(si,wfClusterPK, StepClassificationTypes.Certify, WorkflowStatusTypes.Completed, "Auto completing Forms","Error autocompleting Forms", "Auto completing", Nothing)
selectionChangedTaskResult.WorkflowWasChangedByBusinessRule = True
selectionChangedTaskResult.IsOK = True
selectionChangedTaskResult.ShowMessageBox = True
Return selectionChangedTaskResult