Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Difference between asynchronous and synchronous workflow

(0) ShareShare
ReportReport
Posted on by 826

 I need the difference between Asynchronous and Synchronous workflow with an real time example ..?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Difference between asynchronous and synchronous workflow

    Synchronous workflows are triggered right away away. It will run directly either before validating the database transaction or after (post) the database transaction. The CRM form will wait until the Synchronous plugin has finished processing before the form reloads.

    On the other hand, Async workflows will be triggered some time later when the CRM service has enough resources.  You won't know when this will be triggered.  Async plugins do not slow the form reloading because it doesn’t have to wait.

  • Micchael Profile Picture
    Micchael 390 on at
    RE: Difference between asynchronous and synchronous workflow

    Hi Ram,

    IMHO the main difference is how they perform action.

    Real-time (sync) workflow performs all actions as part of single transaction. It means that full roll-back in case of failure.

    In async (background) workflows all actions are treated independently => no roll-back.

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Difference between asynchronous and synchronous workflow

    Hi Ram Kumar,

    Prior to CRM 2013, all workflows ran asynchronous, i.e., in the background.  Because of this, if a workflow made changes to data, a user would have to refresh his or her screen to see those changes.  An example of this is a workflow that creates a task; in order to see this newly created activity, the user would either have to refresh the screen or leave the form and return.  Additionally, workflows were only triggered after events occurred.  This is still the case if creating an asynchronous workflow, but synchronous workflows can be triggered prior to some events occurring. They have the ability to immediately see results on the screen, or to trigger workflow prior to events has an impact on the need for Web Resources (JavaScript) and plugins in C#.

  • ganeshm Profile Picture
    ganeshm on at
    RE: Difference between asynchronous and synchronous workflow

    An Real Time Workflow (or) Synchronous triggered on a particular event (e.g. Create, Update, Assign and Delete) can also be configured to run on demand.

    This will still run immediately once triggered rather than being queued to run at later point of time as an asynchronous workflow would.

    They do not contain any delay or wait activities step.

    Asynchronous workflows do remain an important option for carrying out high volumes of processes which aren't time critical,

    for example creating activities or sending emails.

    These operation will take place without halting the user process.

    CRM users must have organizational permission to create and activate a real time workflow.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Difference between asynchronous and synchronous workflow

    Adding to the previous comments, I would typically use a synchronous workflow when the business logic is minimal and straightforward so the user doesn't affect the browser performance. And asynchronous when the logic involves high volume tasks which aren't time critical like sending mails or many CRUD operations.

    Plugins are of type System Event and a System Job is created automatically for Async workflows. Unlike synchronous workflows it's not possible to guess if the async workflow has been executed or not. In that case you can track it in the System Jobs in Advanced find or in Settings->Syetem Jobs.

    Unlike async workflows, real-time workflows can be made to execute in the context of the owner or the current user.

    If you needed to convert the workflow type, with the Convert button on top of the workflow editor it can be easily converted without any hassle.

    Users need to have security role permission 'Execute Workflow job' for asynchronous workflows and 'Activate Real-time Processes' to activate synchronous workflow.

    More on this:

    technet.microsoft.com/.../dn531067.aspx

    community.dynamics.com/.../asynchronous-synchronous-processes

    So choosing between the two ultimately boils down to what and how much logic you want to perform and by whom you want to execute the workflow.

    Hope this was helpful!

  • Suggested answer
    AbiRami Profile Picture
    AbiRami 516 on at
    RE: Difference between asynchronous and synchronous workflow

    Hi,

    Async workflows run in the background, while synchronous workflows run and hold you up until they're complete. Async workflows are usually preferred if the task doesn't have to be done at that instant because the end user doesn't have to wait for it to run.

    Refer below thread to know more with real time examples

    community.dynamics.com/.../221335

  • Verified answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: Difference between asynchronous and synchronous workflow

    Hi

    Synchronous workflow: If the action taken place in workflow need to be reflect immediately. You can go with this.It will execute sequentially

    Asynchronous workflow: The action will happen in the back ground(behind the scene)(not reflecting immediately)

  • Verified answer
    Jason M. Cosman Profile Picture
    Jason M. Cosman 5,234 on at
    RE: Difference between asynchronous and synchronous workflow

    Hello Ram;

    Asynchronous Workflows - Triggers when the Async service has enough resources. It's worth noting it's typically checking every 5 seconds to check if there are plugins/workflows to be started.

    Synchronous  Workflows - These trigger right away and actually stop the user from doing anything until completion.

    The best examples i'd have of both is: When creating a Case that has a lower priority the business would send an email out Asynchronously to the team that is responsible as we don't need them to drop everything and work on it. If a case was created with a high priority the business would need the support team to drop everything and we'd be sending that email Synchronously so we know the support team has an email before we take our next support call.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans