Workflow Vs. Plug-in - MSCRM
A workflow can be defined as sets of logical rules that define the steps necessary to automate specific business processes, tasks or sets of actions to be performed on Microsoft Dynamics CRM records.
Main characteristics of workflows are:
- Workflows can be created via CRM user interface without using any code
- Workflows can be run manually or automatically. The automatic running of workflows is based on several data modification events.
- They always run asynchronously.
- Workflow rules are entity specific.
- The state and stage of a workflow instance can be viewed within the CRM user interface by any CRM user with appropriate permissions.
- Workflows are meant to orchestrate a "long" running process that consists of several steps.
- Workflows can be imported and exported from one system to another.
A plug-in is .Net code that is registered on the CRM server. A plug-in assembly can be registered for one or more steps – these steps correspond to the combination of the message (event), entity and stage.An example of a step would be creating message for the account entity on the pre-event stage. Registration of the assembly and steps is part of the plug-in deployment process and there is no direct user interaction with plug-in.
Main characteristics of plug-ins are:
- Plug-ins have to be written as .Net code.
- They have to be registered in CRM via tools in the SDK.(Software Develpment Kit)
- They cannot run manually.
- Plug-in can run on more events than can workflow rules. An example is that a plug-in can run on data retrieval and not just modification events.
- They can run either synchronously or asynchronously.
- Plug-ins are meant for more granular operations.
- Plug-ins can neither be imported nor exported.