Some of the manual activity’s properties can be set dynamically using the Custom Attribute. For example, you can use custom attribute for the Participants property as well as the Length property of the Time Span.
In the Participants property, you can specify a custom attribute such as $AssignedParticipants and then use your .NET code to set the custom attribute value for ‘AssignedParticipants’. This way you can dynamically set the participant of your manual activity through .Net code.
The following is a sample code snippet in C# to set the custom attribute for $AssignedParticipants:
SetCustomAttr(WorkObjectID, "AssignedParticipants", "DomainA\user1");
In the above code snippet, the user DomainA\user1 is assigned as the participant for manual activity that has the participant property set to $AssignedParticipants.
Using this approach, you can assign multiple users as the participants by using demlited strings (with semi-colon as the delimiter).
For example:
SetCustomAttr(WorkObjectID, "AssignedParticipants", "DomainA\user1;DomainA\user2");
In the above code snippet, two users are assigned as the participants.