Forum Discussion
Thanks MikeG . Can you show the instantiation and initialization of wfStatus and currentWF please?
I'm a bit confused by the BRApi call to set the status of the workflow to completed before running the steps below it?
Is the line
"BRApi.Workflow.Status.SetWorkflowStatus(si, currentWF, StepClassificationTypes.Workspace, WorkflowStatusTypes.Completed, "Workspace Completed", "", "User clicked complete workflow", Guid.Empty)"
the part that compels your workspace UI to update with the completed workflow?
I created a Workspace that essentially is a summary of all the Workflow tasks I want to automate. In your instance, you would not need to complete the 'Workspace' complete step, you could delete that or comment it out, and in your solution the first step in your Workflow to complete would be the 'Import' task/step.
- RobbSalzmann2 years agoValued Contributor II
MikeG what I'm looking for is how to compel the UI to show that the steps are complete, without having to click the refresh button. Can you isolate your suggestion to just the line that does this please?
- MikeG2 years agoContributor III
NicolasArgente was close. I'm not certain on the exact line of code. There is not a specific API to refresh the application, that is controlled and/or locked down by the platform. But, my Workspace is indeed updating the Workflow statuses and showing the green check marks in my WFPOV.
selectionChangedTaskResult.WorkflowWasChangedByBusinessRule = TrueselectionChangedTaskResult.IsOK = TrueselectionChangedTaskResult.ShowMessageBox = TrueSo the only line that is new is the ShowMessageBox = True. I don't have the ChangedUIAction=Refresh API code that you are attempting to do. From what I'm seeing in your code above. You are not showing the 'how' you are setting the step completion. If some of those Import steps taking minutes, then they will be running in the background and won't immediately show the green check-mark. In my case, I get a series of notifications that the Background Task is Completed, then the green checkmarks start to appear. So, it's sort of a timing thing and not instantaneous.Lastly, and man this is a lot of free code to offer up Robb. Ha! I'm checking that the Workflow is Active and these are the local vars for currentWF and wfStatus:If Not inputImportChannel.GetAttributeValue(scenTypeID,sharedConstants.WorkflowProfileAttributeIndexes.Active) = "0" Then
'Get current import WF status
Dim currentWF As WorkflowUnitClusterPk = BRApi.Workflow.General.GetWorkflowUnitClusterPk(si, inputImportChannel.Name, scenarioName, timeName)
Dim wfStatus As WorkflowInfo = BRApi.Workflow.Status.GetWorkflowStatus(si, currentWF, False)Best regards,Mike GArchetype Consulting- RobbSalzmann2 years agoValued Contributor II
MikeG thanks for the help!
Related Content
- 8 months ago
- 4 months ago