Skip to content

FIM Best Practice: Create single function Workflows

As much as possible I like to keep my Workflows simple with a minimum number of steps. When updating attributes I prefer, wherever possible, to only update a single attribute per Workflow Definition. So for example I’ll have separate Workflows for “Set DisplayName” and “Set AccountName” rather than rolling the two together in a single “Set Attributes on Creation” Workflow.

There are a few advantages to this approach:

  • When you look at the list of Workflows triggered by a MPR it is really easy to see what they’re doing without having to drill down into the Workflow Definitions themselves.
  • The Workflows are re-usable – that “Set DisplayName” workflow can be used both at object creation and when a name is changed.
  • You’re less likely to inadvertently run two workflows at the same time that update the same attribute – resulting in the dreaded “SQL insert duplicate” error and a failure of the activity.

Of course there are good reasons to run multiple steps in one Workflow Definition, in particular where you need to ensure a certain order. This best practice does not negate such requirements. However more often than not we pile extra steps into an existing Definition because it seems quicker and easier at the time, when for the sake of clarity, and long-term reusability, we’d be better off creating new Workflows for those extra steps.

Got something to add? Disagree? Comments are open!

{ 2 } Comments

  1. bobbradley1967 | October 29, 2012 at 9:17 am | Permalink

    Hi Carol
    Agree 100% on the first bit, and it leads logically to the second idea about atomic updates. However in large systems I’ve found the cost is too high for this in terms of generated request activity, and I’ve found requests are far more readable and efficient if you can combine your updates in a single step. Therefore what I do is build up a single request update using WorkflowData as necessary, then commit all changes in a single action. I started out the way you have but changed pretty quickly shortly after …
    Just my take, and why the 2 CRUD workflow activities I use are so valuable to me.
    Cheers
    Bob

  2. David Lundell | October 31, 2012 at 8:49 pm | Permalink

    I need to agree with Bob on this. The performance considerations outweigh the cleanliness. I do agree that the duplicate SQL insert is a pain.

Post a Comment

Your email is never published nor shared. Required fields are marked *

Spam comments will be blocked by Akismet

*

Endep online order buy prednisone online canada order buy Endep online purchase Endep online without script buy generic Endep from india buy in Endep uk where to buy Endep without a prescription Endep from canada buy 10 mg Aricept generic Aricept cost order Nizoral no visa Nizoral 200 mg buy cheap Nizoral line Nizoral on line online ordering Famvir buy Famvir without a rx overnight shipping Requip Requip free Requip Nizoral online buy saturday delivery buy Nizoral in mo how to buy Cytotec online without a rx order Aricept pharmacy buy Aricept with no prescription buy Amitriptyline no perscription cod Online us Requip how to buy Amitriptyline without a prescription Maxalt cheap buy cipro online buy line Amitriptyline buy Amitriptyline money buy purchase Accutane 40 mg on line no rx Accutane 40 mg sale order 40 mg Accutane online next day delivery 40 mg Accutane online buy accutane online