I am dealing with an issue in a workflow and am now stuck and hoping someone can give me a clue. The person that originally set it all up is no longer accessible, and I don't know why they did what they did - it's quite convoluted. And I do not currently have the option of creating something from scratch.

So a SharePoint Online site has a PO list in which users can submit a new PO. The New PO form is a custom InfoPath xsn which includes a field for "approval manager", which is a person lookup field.

When the PO is submitted, it kicks off the workflow, which starts with setting a workflow variable called "ApprovingMgr" to the value of the approval manager PO field. Then it creates a Task in the associated tasks list to have the manager approve or reject the PO.

The task item form is also a custom InfoPath xsn, which simply displays who requested the PO, the due date, the task name, and buttons for 'Approve', 'Reject', or 'Cancel'. The workflow itself sets the task's 'Assigned To' to the workflow variable "ApprovingMgr".

The problem is that this both is and is not working. Later in the workflow there is an action to log an event to the workflow history list that says

Task created for [Current Task: Assigned To]

and these events are logged to the history and do display the name of the approval manager selected. However, in the actual tasks list, the 'Assigned To' fields are blank (empty). I have no idea why it seems to work fine according to the history, but at the same time isn't actually assigning the tasks? As a result, the managers are unable to approve the POs. They do get the email notification sent via the workflow, but are unable to see the tasks.

There's more to this: recently the whole workflow itself stopped working. It turned out that the actions in the workflow that were setting variables for people were failing because it expects a simple name, but the return type of what it was being set to was "As String" instead of "Display Name". Changing those to "Display Name" fixed the issue and the workflow started working again.

The thing is, every time I publish changes to the workflow in SharePoint Designer, it tells me the Task xsn requires an update. So I have to open that in InfoPath, then it automatically detects changes and updates the form accordingly, then I just do a 'quick publish', and then it lets me publish the workflow.

The current name of the Task xsn is "Approval Workflow Task _x0028_en-US_x0029_ Copy 2 Copy Copy Copy 1 Copy". I noticed that if I look in the Task list settings, what looks like previous versions of this form are listed as Content Types. I don't know why the form as to be included as a content type for the list?? But figuring maybe that's the issue, I went ahead and created a new content type with that same name based on a previous version, and then added that to the list...but that did not fix the issue.

Here are some screen shots that may help:

Overall workflow:

Overall Workflow

Task Process:

Task Process 1 Task Process 2

Specific Task Behavior:

task behavior

Tasks with empty assignee:

blank assignees

UPDATE 11/3:

I added an action RIGHT AFTER the action to assign the task to the approval manager that says to log to the history list an even that says

Task [name] was assigned to [assigned to field]

This also works and shows the name of the person I expected it to....but still the Assigned To in the tasks list is blank.

So I figured I'd try modifying the return type of the lookup in that action that does the assigning - so far I've tried "Display Name", which is what is was originally..."ID", which returned a -1...and "As String", which behaves the same as "display name". What should that be?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.