# How to assign action to a dynamically generated participant?

**URL:** <https://discuss.workflowgen.com/t/how-to-assign-action-to-a-dynamically-generated-participant/1274>\
**Category:** General WorkflowGen Discussion\
**Created:** [January 22, 2019, 2:28pm UTC](https://discuss.workflowgen.com/t/how-to-assign-action-to-a-dynamically-generated-participant/1274 "2019-01-22T14:28:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason.smith](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@jason.smith](https://discuss.workflowgen.com/u/jason.smith)\
**Post date:** [January 22, 2019, 2:28pm UTC](https://discuss.workflowgen.com/t/how-to-assign-action-to-a-dynamically-generated-participant/1274/1 "2019-01-22T14:28:22Z")

</div>

I am starting a workflow via the Web API, so I do not have the user information when the wf starts. How do I notify a user via email with a link to the action that then assigns the action to the user that received the email?

In other words: I need the participant to be defined as the Requester Role dynamically inside the workflow (or when the workflow starts). I have access to user properties such as Domain Name, AD UserName and AD Email Address.

Can I start a workflow as a user with those properties?

I have searched the forums and have not seen a scenario that describes my use case.  
Jason

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [January 22, 2019, 4:21pm UTC](https://discuss.workflowgen.com/t/how-to-assign-action-to-a-dynamically-generated-participant/1274/2 "2019-01-22T16:21:35Z")

</div>

Hi @jason.smith,

It is recommended that all potential requesters to be predefined.

In case a user that you would like to launch a request is not present in the REQUESTER participant group, you can add him using the method [AddAssociationsToParticipant](https://docs.workflowgen.com/v7144/api/html/cc819564-5567-b52b-bf55-ec60fd701f3f.htm)

You can check if a user exists in the participant group using the method [GetParticipant](https://docs.workflowgen.com/v7144/api/html/c049d1ca-34ec-28ca-0103-afdaed8856c1.htm)

In the Notifications tab of the first action, make sure the **Todo** notification is checked.  
If the process is launched by a different user than the requester (which is the case using the Web API), a Todo notification will be sent to the requester which contains a link to the request by default.

With the [StartProcess](https://docs.workflowgen.com/v7144/api/html/de53aee8-0842-d8df-70e4-e39466d5f435.htm) method, you can launch a new request as another user by using the **impersonateUsername** parameter as indicated in the documentation.

Hope this helps.

Regards,  
Eddy.

---

<div class="post-metadata">

**Author:** ![jason.smith](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@jason.smith](https://discuss.workflowgen.com/u/jason.smith)\
**Post date:** [January 22, 2019, 6:56pm UTC](https://discuss.workflowgen.com/t/how-to-assign-action-to-a-dynamically-generated-participant/1274/3 "2019-01-22T18:56:01Z")

</div>

Thanks for the feedback. So, when I attempt to launch my process with importonateUsername the process still launches as the context of my username, not the other user:

[http://wfgserver/wfgen/ws/ProcessesRuntime.asmx/StartProcess?processName=APPLICATIONSELECTOR&test=True&context=contextXML&impersonateUsername=yei\wachsmanj](http://wfgserver/wfgen/ws/ProcessesRuntime.asmx/StartProcess?processName=APPLICATIONSELECTOR&test=True&context=contextXML&impersonateUsername=yei%5Cwachsmanj)

See also the uploaded photo showing that wachsmanj is a user in the list of Requesters.

 ![jwachs](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/c4ba3a8bfebdfb0e856bf1660c8ef53de8616a23.jpeg)

Any thoughts on what I might be missing here?  
Jason
