convert workflow to sessions