Running activity before automatic deletion RRS feed

  • General discussion

  • I have a set transition MPR that triggers the "Expiration Workflow" to automatically delete accounts.

    Before an account is deleted, for whatever reason, I need to run a custom activity. Since this activity needs to access the definition of the object being deleted, it runs in the authorization fase. This custom activity is run by an MPR that is triggered by delete requests on "All People", and has as requestor "All People" as well.

    My problem is that the requestor for the delete operations caused by the transition-based MPR is not in all people, as the requestor is the "Expiration Workflow" itself.

    I tried creating a new MPR that runs when a person is deleted and the requestor is in a set that contains "Expiration Workflow", but it did not work; is the authorization phase being skipped in this case?

    I thought of another solution, i.e. creating an "Account expiration workflow" with my custom activity before the Delete Resource Activity. The problem here is that the Delete Resource Activity is not available in the activity selector, so to add it I exported the XOML of the "Expiration Workflow" and re-imported it in a new activity. Are there any inconveniences in doing this?

    Also, is there a simpler way to do what I'm trying?


    Paolo Tedesco -

    Thursday, June 28, 2012 3:33 PM

All replies

  • Why don't you just create your own Delete Resource activity and set the actor on it to something that will trigger AuthZ? Should take about 5 minutes to create.

    My Book - Active Directory, 4th Edition
    My Blog -

    Thursday, June 28, 2012 10:39 PM
  • Hi Brian,

    Do you mean creating a custom activity and setting the actor programmatically?

    Sounds like a good idea, I'll give it a try.

    By the way, why isn't the "DeleteResourceActivity" used by the Expiration Workflow selectable from the Activity Picker?

    Paolo Tedesco -

    Friday, June 29, 2012 7:35 AM
  • There's no designer for it - they just pasted the XOML into the workflow. I just have a simple activity in my library that encapsulates the DeleteResourceActivity and has an empty designer.

    My Book - Active Directory, 4th Edition
    My Blog -

    Friday, June 29, 2012 3:22 PM