1. A method for managing workflow for an application, comprising: obtaining an application adapter associated with the application, wherein the application adapter specifies a sub-task; monitoring the application to obtain a state; and performing an action associated with the sub-task, if the state is associated with the sub-task.