FALCON-369 Refactor workflow builder. Contributed by Shwetha GS