crm2015 online: phasing of workflow instances possible? RRS feed

  • Question

  • Hi, 

    is it possible to phase workflow instances?

    What i mean is:
    Is it possible to have some workflow per definition executed one by one (only run one workflow-instance at the same time).

    I have the problem, that i use a custom workflow, that checks if a value exists in a field of a connected entity.
    If no instance exists, it will be created and assigned to the lookup-field.
    If 1 instance exists, the lookup will be filled.
    If more than 1 instance matches, a queue item will be created, that the lookup cant be filled.

    If i run the workflow on 1 instance, everything works like expected.
    It also works if 1 instance matches and i had the workflow running on f.e. 10 records (every lookup will be filled with this value)

    But if the instance wasnt found (search condition doesnt match and the related record needs to be createdi and starting the workflow more than 1 record, there will be created lots of related records with this same value.

    But that was exactely what i wont. I checked this exactely because of the reason, that i only want to have 1 record for a value and if there is no record for a value, create it, BUT ONLY ONCE.

    Is this doable? 

    THX, Greets PeB

    Wednesday, February 17, 2016 4:24 PM

All replies

  • anyone?
    Monday, February 22, 2016 10:04 AM
  • CRM does not provide any means to do this - each workflow instance runs independently. You might be able to use similar techniques to the various AutoNumber examples to provide some form of locking mechanism, but this still may not work.

    If you have CRM OnPremise, I'd suggest using an external SQL table to provide a locking mechanism, as you can fully control this locking behaviour

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, February 22, 2016 12:53 PM