How workflow segmentation works