locked
when to create custom workflow and when create plugin? can any body give a best example when we should create over each other? RRS feed

  • Question

  • Hi,

    There is a question asked by someone from team,

    when to create custom workflow and when create plugin? can any body give a best example when we should create over each other?

    I have heard from people saying we have execution time restrictions, if we are dealing with more data we should create workflow and all... that may be a reason, but i believe there is some other reason behind this.

    Would anybody able to help out by answering with an example.

    If we need to create a custom workflow for something, y cant we achieve the same with plugin?

    Thanks in Advance.


    Sreeni Pavalla

    Monday, June 9, 2014 1:38 PM

All replies

  • My rule of thumb is "do you need it to happen in the transaction?" If so, use a plugin. If not, use a custom workflow to reduce load on the webserver.

    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

    Monday, June 9, 2014 1:43 PM
  • Walton, 

    Thanks for your quick reply.

    Would you be able to give a simple real time scenario?


    Sreeni Pavalla

    Monday, June 9, 2014 1:47 PM
  • Another way of looking at it is, you use a workflow if a set of actions have to happen over a period of time, and will require some sort of external action in order to progress from one stage to another. This could be time driven, user driven, related record data change driven, etc. 

    Plugins are generally more contained, tend to be executed in one shot, in the context of a transaction. 

    Of course the line is a little blurry-er than that, and there are a lot of circumstances where you can use either/or interchangeably. For those instances, it depends on the familiarity of the developer having to build the component primarily. 

    Monday, June 9, 2014 5:43 PM
  • Workflows are useful if you want to be able to easily edit the content or disable them.

    Examples of when I would use a workflow:

    • Sending emails
    • Creating tasks/phone calls
    • Waiting for a date to do something

    Examples of when I would use a plugin:

    • Updating records based on conditions
    • Automatically creating/associated related records
    • Custom validation

    If you do notifications (emails, tasks) as workflows, it makes it easier to disable them when doing data imports etc.

    Paul


    If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".

    Twitter LinkedIn Facebook Blog Magnetism

    Monday, June 9, 2014 9:15 PM