I have reviewed the 'Auto Workflow Assignment' lab.
I wish to model the following scenario:
1. Add a mandatory 'ECR Coordinator' property to the ECR ItemType and ECR Form. The ECR creator selects the User that will coordinate the processing of the ECR. (Done)
2. Create a new ECR 'Workflow Map' that has the assignment of 'ECR Coordinator' at certain Activities. The 'ECR Coordinator' is an Identity with no members. (Done)
3. Create a new ECR, and the following occurs. (to be Done)
3.1 The OnActivate method determines the 'Get Controlled Item'.
3.2 The relationships are expanded from the 'Controlled Item' to find all the activities that have the 'ECR Coordinator' identity assigned.
Workflow Process -> Workflow Process Activity -> Activity -> Activity Assignment -> Identity
3.3 For each 'Activity Assignment' relationship that has the 'ECR Coordinator' identity assigned either
(a) Change the related_id from 'ECR Coordinator' to the user assigned as the ECR Coordinator from the ECR item
(b) Create a new 'Activity Assignment' relationship between the Activity and the 'ECR Coordinator' user. Then delete the existing 'Activity Assignment' relationship that has the related_id of 'ECR Coordinator'.
4. The Workflow Process continues, with the 'ECR Coordinator' being given tasks, and email notifications.