locked
Sync workflows not running RRS feed

  • Question

  • Hi all,

    I'm currently upgrading a CRM 2011 installation to CRM 2013 and there's a couple of areas which are using REST EndPoint in JavaScript to grab data from parent records. I was looking forward to trying out real time workflows and I've written these and activated them but nothing happens. I've been on a few web sites to check how they should be set up and they're as they should be but when I change the relevant field on the form, nothing appears to happen.

    Should the update happen immediately or, like some traditional workflows, might it take a moment or two before starting - I'd have guessed, as they're called 'real time' workflows, they should update pretty quickly.

    Is there anything else on the system that I have to set up?

    Just in case anyone wants to know; I've left the 'run in background' check box empty, the trigger condition is a change to a single field on the form with 'after' selected, they are set to run as workflow owner who is a system admin and they're published.

    Tuesday, March 24, 2015 4:26 PM

All replies

  • Hi Jon,

    A few clarifications please so we might be able to help you out. By "I change the relevant field", I am sure you mean update the field (so change it AND press Save) correct? Workflows trigger on the update of fields, not on change (JScript does that for you).

    A few more: Do these same workflows run asynchronously? And, are we sure it is not the logic implemented - For instance, does a simple Update Record workflow with no other steps fail to work as Sync but is successful Async? Is it possible some of this Javascript is changing the value for this particular field and it might be conflicting with the workflows?

    In response to your question, no, normally in order to set the Workflow as Sync the checkbox you mention has to be empty (Convert to Real-Time workflows - on top of the screen). And yes, Sync workflows would run pretty quickly after the update is performed.

    Tuesday, March 24, 2015 11:12 PM
  • Hi Jon,

     It may be worth checking if system jobs are queued up in your instance. This would happen if your Dynamics CRM Asynchronous processing service is not running.

    Regards,

    Jithesh

    Wednesday, March 25, 2015 2:41 AM
  • Hi both,

    Thanks for replying.

    This may be my misunderstanding of the whole process, I thought that the real time workflows were designed to run as soon as the field is changed? Are you saying that the form has to be saved and then the workflow runs at this point which then updates the record before it's loaded again?

    From what I can see, there are no workflows waiting to be processed - as this is a multi-tenanted dev server with multiple organizations on, I think that it would be flagged quite quickly if there was an issue around the async service.

    Wednesday, March 25, 2015 11:57 AM
  • Sync workflows run inside the transaction, not "pretty quick after the update". If the trigger is an update of the field that is the trigger event.

    At this point, if you have autosave enabled, the field (if the value change) will be saved when autosave kick-in, if autosave is disabled when the record is saved.

    Of course if you do the update of the field using a REST call that will trigger the synchronous workflow as well


    My blog: www.crmanswers.net - Rockstar 365 Profile

    Wednesday, March 25, 2015 12:06 PM
  • Hi Jon,

    Yes, that's exactly what I meant, the sync workflow will trigger on the event of updating the field (So changing it plus actually saving it). Onchange events could be implemented for example via Business Rules if you'd like simpler actions like setting a value on another field or locking a particular field (read-only).

    Workflows run server side and sync workflows in particular run when the message is triggered (in your case, the message is the Update on a given field). The effect of the workflow should be immediately visible to you upon saving the record so long as that particular field has been changed.

    Wednesday, March 25, 2015 10:59 PM