How is the WorkflowManager Navigation Stack supposed to work? (1 Viewer)

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    In Onlinevideos I have 3 basic WorkflowStates: Sites -> Categories -> Videos.

    Currently everytime a new state is entered, I push that WorkflowState on the NavigationStack using IWorkflowManager.NavigatePushAsync.

    Sometimes there are Categories below Categories (recursive), so there are multiple Category - WorkflowStates on the Stack. It is then impossible to go back by pressing any previous state in the NavigationBar (going back one State by pressing ESC works fine).
    I looked at WorkflowManager.NavigatePopToStateInternal, which is called in that case. It cannot handle multiple states with the same Id (Guid) on the stack:
    Code:
    while (CurrentNavigationContext.WorkflowState.StateId != stateId)

    What shall we do? I guess this scenario does not happen in the default Media Screens, but I think it is a valid one? If not, how should I re-code my Navigation?
     

    Albert

    MP2 Developer
  • Premium Supporter
  • February 18, 2008
    1,297
    1,130
    45
    Freiburg im Breisgau, Germany
    Home Country
    Germany Germany
    AW: How is the WorkflowManager Navigation Stack supposed to work?

    It's the same as in the media navigation.
    We differentiate between fixed states that have a fixed state id and transient states, which cannot be declared in the workflow states file because they are dependent from some external state (like in the media navigation the directories - each directory is mapped to its own workflow state). Take a look at the methods NavigatePushTransient respective NavigatePushTransientAsync.
     

    Users who are viewing this thread

    Top Bottom