locked
strategy for executing real-time w/f's? RRS feed

  • Question

  • Hello, I'm trying to figure out the best approach for executing real-time w/f's as part of an application infrastructure. Say, for example, that the business requires you to update 3 external systems as part of your standard case save.

    I've written code in a previous 2011 implementation that calls a w/f via js but it seems like a more robust approach for this particular scenario would be to execute the real-time w/f's through plugin code. However, I'm wondering how much additional time is required for a w/f to get triggered if it gets called from within the PreCaseUpdate plugin as opposed to js?  

    Also, have you tried to use real-time workflows as a decoupled architecture to support greater scalability? The "Available to Run" section of the Process form displays the following option:

    "Run this workflow in the background (recommended)"

    I think I read somewhere that running the workflow in the background is recommended for performance reasons. So I'm wondering if delegating most business logic into real-time w/f's instead of plugins to support a goal of scalability could actually have the reverse effect since CRM explicitly recommends running the w/f in the background instead of in real time? Or does CRM have a recommended server configuration/strategy to support this type of architecture?
    Monday, June 2, 2014 10:28 PM

All replies

  • Real-time workflows are intended for things that need to be done in-transaction.  I think of them as something that potentially can replace certain plugins. However, this also means they directly impact the performance of your server, as they interrupt the normal flow of things to fire immediately. Also, anything called from a real-time workflow will also be in-transaction, except for asynchronous workflows.

    If you click  "Run this workflow in the background (recommended)" then the workflow is NOT real-time. It is a traditional asynchronous workflow.

    So consider: do you need those other systems updated during your CRM transaction?  Is it important enough to impact your CRM Server performance?  Or can those system updates be handled asynchronously after CRM has completed its transaction?

    Real-time workflows should be used sparingly.  Think of them as a replacement for some plugins, not as a replacement for traditional asynchronous workflows.


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

    Tuesday, June 3, 2014 2:47 PM
  • @Wayne - thanks for the info. I'm trying to get a better understanding of the performance impact.

    "this also means they directly impact the performance of your server, as they interrupt the normal flow of things to fire immediately"

    What other "things" are you referring to that would be firing immediately?  I assume plugins may be 1 thing you're referring to. However, if the app design eliminates plugins in lieue of real-time workflows then this should not be an issue, right?

    Also, aren't plugins designed to fire immediately? If this is the case then shouldn't replacing 1 plugin with 1 workflow essentially maintain the same level of server performance? Or do workflows have inherently worse performance than plugins for some reason?

    Also, can you recommend a load testing tool for CRM? I'd like to get a better understanding of the specific performance metrics with real-time workflows. For example, what happens to server performance if 1000 real-time workflows are kicked off concurrently on the same server?

    Tuesday, June 3, 2014 8:21 PM
  • If you're going plugin-to-synchronous workflow, then you're likely fine when it comes to relative server impact. Yes, plugins fire synchronously.

    As for load testing, I don't know specifically, but any testing tool for websites that lets you use credentials should be able to handle it.


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

    Wednesday, June 4, 2014 4:53 PM