Custom worklfow vs Custom plugins


A Custom Workflow Activity Plugin is very similar to a Plugin exempt that it is executed from within a CRM Workflow, Whereas Plugins Are executed on Events that Occur on the Entity.

Workflow Activities

-Custom workflows are triggered by standard workflows available in CRM. Triggers limited(Create, Update, StatusChange, Delete and On assign).

-Workflows are better when you need the operation needs to be configured periodically by non programmer administrator, where you can implement the configuration part as standard workflow (Workflow1), and static part of the functionality as custom workflow which will be executed by the standard workflow (workflow1).

-An workflow won't work in offline mode because it requires to have access to the crm live server to trigger the workflow, whilst in offline mode changes are not made to the live crm server...they are made locally on the client app and synced later.

-Workflows can be manually executed, or automatically triggered by selected events.
-Workflows can be limited to automatically execute within specific organizational scopes (ie. Org, BU, Parent and Child BUs, or for the Owner only).
-Workflows can be turned off (by unpublishing). Plugins are always on

Custom Pluggin

-Number of triggers available (called as Steps/Message) to trigger the pluggin execusion.
Plugins have higher flexibility than workflows which makes it suitable for highly complex logics.

-If we are using outlook client in offline mode workflow won't run. (From SDK: When you work offline, CRM disables workflow notifications. If the changes you make offline are set to trigger an automated workflow process or a system job, the process is automatically triggered when you go back online.) Plugin workflows in both online and offline mode.
- Plugins are always triggered by the messages to which they're subscribed, though some Messages allow limiting execution based on whether certain attributes have been passed into the Message.
-Plugins are always on, can't be turned off

Finally,

When your scenario is not have big complexity in terms of triggers and operating modes or it needs some sort of reconfiguration needed by non programmers periodically go for Workflow/custom workflow else go for Plugins.

When speed of execution, security of process, and validity of data are integral, It's better choice to use Plugins but when flexibility, functionality reuse, i'd choose Workflows.

References:

  • https://www.magnetismsolutions.com/blog/roshanmehta/2012/07/27/when_should_i_use_plug_ins_vs_custom_workflows
  • https://social.microsoft.com/Forums/en-US/62ed66f7-29e6-44df-b255-234114c36ccf/need-key-difference-between-plugin-and-custom-workflow?forum=crmdevelopment

Comentarios

Publicar un comentario

Entradas populares de este blog

How to Improve Microsoft Dynamics 365 CRM Performance

How to Add a Record Wall to a Form

Dynamics CRM Quick Tip: Creating Custom Activity Feed Posts