Pulling up success flag functionality into Maestro base.

@stephanh Can you please review flag creation , we can move this up here.
Can you add a scaladoc comment about what this functiion does please.