How I did it on one of my
forms was as follows.
On you form where appropriate,
add a people picker control. I added 1 control per person to be added (max3). Name the fields appropriately
i.e. ExtraPermission1, ExtraPermission2 etc.
Publish these fields as extra
columns in your SharePoint library.
Then in the workflow where
appropriate (not at the beginning-unless they need access straight away):
1.Add the Impersonation step
2. Within the Impersonation
step add a step "block" per people picker field.
3. Then write your workflow.
If current item: Extra
Person1 is not empty
Set Variable:ExtraPermission1 to
CurrentItem:ExtraPermission1 (You'll create this variable "ExtraPermission1" at the time of writing)
Add (List Item Permission) “Required Level” i.e. Read in
Current Item.
Else log no permission added
for Extra Permission 1.
Repeat for each extra people
picker control
Create yourself a test form and library if you don't have one already, so that you can go through the steps and see what is what.
i.e.
can you publish the fields from your form?
when you add Names to the people picker control, do the values come through as expected?
Test the workflow steps, add a log entry after each piece, then if something goes wrong, you'll know where it works or doesn't.
Then you can add it to your real form and test again.