Forum Discussion

AndreaF's avatar
AndreaF
Contributor III
2 months ago

Dashboard to refresh workflow POV after executing data management sequence

Hi,

I have created a dashboard with a Reset Scenario button.

The code behind the button updates the workflow time, wf start time and wf end time of the workflow scenario (there is actually a dialog dashboard in between, i.e. when I press Reset a dialog box opens asking what the new WF Time should be, and user can press OK to reset the scenario or Close the dialog. WF Start and End times are determined based on the WF Time).

The issue I have is that the workflow POV does not change, unless we click on a different workflow step, which can be confusing. So if I change the WF Time of the scenario member, using the Reset button from 2024 to 2025, the workflow time POV (the one shown in the OpenPlace tab) does not change, but as soon as I click on the following step (eg. Seeding) the workflow time POV changes to 2025.

How do I make so that the Reset button forces the workflow POV to refresh? Do you think is something that I can achieve at dashboard level (through refresh or redraws) or business rule level?

Thank you

 

  • Yeah, it will have to be a dashboard extender rule for the above to work. Maybe a change for a rainy day 🙂

  • pranav46's avatar
    pranav46
    Contributor II

    You probably need to write a rule and attach with your dashboard which update workflow pov.

    • AndreaF's avatar
      AndreaF
      Contributor III

      Do you know what are the specific commands that update the workflow POV in this case? Thank you

  • EricOsmanski's avatar
    EricOsmanski
    Valued Contributor

    Are you changing the Workflow POV through the buttons "POV Action" properties or are you doing it through a BR? Can you share more screenshots with the setup of the button and any BRs?

    • AndreaF's avatar
      AndreaF
      Contributor III

      Hi EricOsmanski, I'm not changing the Workflow POV right now; I was just asking how to do it. What the button currently does isn't important. Whatever it does, I want the Workflow POV to change when it's clicked. I tried using the POV Action options you mentioned, but they don't seem to work.

      For example with the POV Action set like this:

      when pressing the button from the following workflow step:

      there is no change in the workflow, it stays on [Admin.Reset Scenario/RF_M11/2026]. Am I doing something wrong with the POV Action setting?

       

      • KarlT's avatar
        KarlT
        Contributor III

        You can use something like this at the end of your dashboard extender to ensure it reflects the updated workflow POV

        Dim wfInfo As WorkflowProfileInfo = BRApi.Workflow.Metadata.GetProfile(si, si.WorkflowClusterPk.ProfileKey)
        							BRApi.Workflow.General.SetSelectedWorkflowView(si, wfInfo.Name, 
        								brapi.Finance.Members.GetMemberName(si,dimtypeid.Scenario,si.WorkflowClusterPk.ScenarioKey), 
        								"2028")
        								
        							
        							Dim selectionResult As New XFSelectionChangedTaskResult()
        							selectionResult.WorkflowWasChangedByBusinessRule = True
        							Return selectionResult

        Using the POV action should generally work fine, but for this use case with the Range scenario and the timing it won't work. The above code should achieve your result though.

  • AndreaF's avatar
    AndreaF
    Contributor III

    Thank you KarlT and ckattookaran . Right now my setup is that the button runs a data management sequence, which calls an extensibility rule. I have tried adding the code to the extensibility rule, but it does not affect the workflow POV, possibly because it is an extensibility rule and not a dashboard extender rule. Changing the workflow POV is a nice to have, so probably I will not spend effort to change the setup to a dashboard extender rule.

    • KarlT's avatar
      KarlT
      Contributor III

      Yeah, it will have to be a dashboard extender rule for the above to work. Maybe a change for a rainy day 🙂