SketchFlow: Global State Behavior Sample
from Christian Schormann
In a previous post last week I posted a sample for a behavior for conditional navigation by using a global state object. Just a few days later, we got a question on how to represent and reflect user roles (or other global state) in a SketchFlow application. This article shows a simple example how this can be done. There are many possible extensions and variations on this technique, but in this post I can’t do more than show a simple starting point.
The concrete problem the customer wanted to solve is this: A SketchFlow prototype should allow the user to select a particular user role on one screen, and other screens should reflect this choice by displaying UI depending on the role.
In this sample, the idea is to use different Visual States to represent different roles, and some behaviors and triggers to set and act on the state stored.
The sample contains three actions and one trigger:
- SaveGlobalStateAction
- SetGlobalStateAsVisualState
- MapGlobalState
- GlobalStateChangeTrigger
more here

