While I was going through few blogs I found below information about plugins and workflows, I thought it would be useful for many.
Plugins:
- Plugins can be executed immediately or queue to execute after core operation.
- Plugins that execute immediately (Synchronously) increase response time as they are part of main processing.
- Plugins that are queued (Asynchronously) does not impact response time as they run as a separate process (Async services)
- Any plugin registered, execution is restricted for 2-minute time limit
- Plugins support online and offline execution.
- Plugins can execute operations, under user context or on admin context.
- To register a plugin, user must require security roles like System Administrator and System Customizer and part of deployment administrator group.
- Plugins registered in online environment in sandbox mode will have some restrictions.
- Plugins can be written by a Dynamics CRM developer
Workflows:
- Like Plugins, workflows can be executed immediately or queued to execute after core operation
- Real-time workflows impact response time whereas Asynchronous workflows doesn’t.
- Workflows can be written for long running processes however each activity in a workflow is restricted to 2-minute execution limit.
- Workflows can only be executed in online mode.
- Actions like, pause, wait, cancel, postpone and resume can be performed on workflows where state is saved before pause or wait. This doesn’t hold good for real-time workflows. Real-time workflows follow plugin rules.
- Workflows can be created by using interactively in CRM web application by any user. However, a developer is required to create custom workflow activity.
- User should have System Administrator, System customizer roles and should be part of deployment administrator group to register a custom workflow assembly.
- Real-time workflows can be executed under calling user context or administrator context. Whereas Asynchronous workflows can execute under administrator context only.
- A workflow can be executed on-demand.