Client side code for Workflow2.0