There is a great write up on how to use the enumerate Resources Activity to update items in FIM here: http://www.fimspecialist.com/fim-portal/custom-workflow-examples/custom-workflow-example-enumerate-resources-activity/
I only had to do one thing differently to get it working in my environment. In the designer.cs file, I commented out the line:
this.Activities.Add(this.sequenceActivity1);
and instead add the activity on the enumerateResourcesActivity:
this.enumerateResourcesActivity1.Activities.Add(this.sequenceActivity1);
Unrelated to the post that explains updating objects with enumerateResourcesActivity, I got a rather misleading error when executing the update: “CompositeActivity cannot transition to ‘Closed’ status when there are active child context still exist for child activity.”
Apart from the confusing grammar, I assumed something was wrong with the sequence I was using to update the object. It turned out to be much simpler: I had a typo in one of the attribute names I was updating. I think this error is thrown if the update fails and the activity doesn’t get to close.