SharePoint workflows provide a great way to automate the business processes. They usually are created for the business processes where humans are involved to move the process forward. SharePoint provides event receivers to automate the business process which run automatically by the system without involving human beings,.
SharePoint workflows can be developed in different ways such as:
- InfoPath forms based workflow
- Tasks based workflow
- Office driven workflow
InfoPath forms provides a very fancy user interface. The user “lives,” in the InfoPath form and controls the workflow from here as well. The InfoPath form changes the look and feel of the form depending on the current state and the permissions of the users involved in the workflow.
Task based workflow create tasks for the users who have been assigned a task to move the workflow forward. For example, if the manager has to approve the expense report, a task is created for the manager and a notification is sent to the manager. The manager approves or rejects the expense report by completing the task and marking their preference of approval or rejection on the task itself. The workflow moves forward in this fashion.
Office driven workflow can be controlled directly from Office applications like Word, Excel, and PowerPoint. The user gets a notification with a direct link to the underlying Office document on which the user has to complete a task. There is a configuration setting in SharePoint which forces the Office application to display the “Document Information Panel (DIP),” at the top of the document when the document is opened using the SharePoint link. DIP contains the metadata for the document library to which this document is associated with. One of the metadata columns is an action which contains all the steps for the workflow (Approve, reject, return with comments etc.). The user makes changes to the document and picks the action from within the DIP visible in the Office application. As soon as the user saves the document, Office saves the metadata changes in the DIP to the document library in SharePoint along with the document itself. As long as the workflow is configured to be running when the item changes, the workflow will execute automatically since the list item containing the document gets changed by the user along with the document. The workflow looks at the new setting for the action metadata and moves the workflow forward. In this scenario, the user controls the entire workflow from within Office applications and does not necessarily have to work with SharePoint directly.