Hello, I'm just checking with other users if they have found a way to allow users access the edit form of a Item with InfoPath Form or InfoPath Library and have access to the flexi-task outcomes and responses on the same form. There is documentation to making this work using webservices in your InfoPath form design and it worked great. Up until I switched to SP2013 and Claims Based Auth, which the document stated has no workaround yet.
I'm just curious if anyone else managed a workaround? The problems is that we set up our secure store and all the InfoPath ULX files because the web form will only pass as Anonymous now. The GetRunningWorkflowTasksForCurrentUser call requires the local user account but the secure store has a static account, its not returning "My Tasks", it's returning the tasks of the account in the secured store. I wish I could make it a variable somewhere.
Solved! Go to Solution.
I was in the same boat as you.
As a workaround, you could get all running workflows on the file and specify the workflow that you want to get (since only 1 of the same workflow can run on a single file).
Do note that you can't approve it from within the InfoPath form due to the same anonymous web service request.
I found a way to do some of this and want to share. Maybe I'll learn some more efficient methods based on this idea. I'm not a great documentation writer, I hope you can follow along.
The issue is InfoPath and Claims means, everyone is anonymous when making web service calls. This means the WS for GetRunningWorkflowTasksForCurrentUser will not work. The reason I want an approval task assigned rather than just a "approval repsonse" site column is because I only want that assigned person to have access to the approval button on the form. This is a hybrid of both.
There is another webservice named GetRunningWorkflowTasksForListItem that you can pass through the ItemID and ListName, in return it will provide you with the TaskId(s) and UserID(s) that it are assigned to. It does not with FlexiTasks, only Approvals and Reviews.
InfoPath, Set up the datasource and some OnLoad rules to get the ItemID and List Name of the record then query the web service. Evaluate if there are any taskIDs for that Item and test if the UserID of the Task matches the User logged in. If so, then you can unhide the section related to the Approval Request. (refer to Nintex SDK for the other infopath tip, it's similar)
You can't pass any values back through the web service (again it's because you're anonymous) in regards to how the user responded so I have list site columns for "WFResponse, WFComments, WFApprovedBy" that are being populated by the InfoPath Form when it submits.
The trial and error part in Nintex. Basically I'm making a parallel action. One branch is the approval request step. The other is fake-approval process. It watches the item for a change in the WFResponse field to equal one of the valid replies. The next Action is Complete Workflow Task associated with this step so that workflow can move on.
The last part you'll learn after some testing. On the branch with the Approval/Review Action, you need to add a step that catches when a person completes the Task via SharePoint or Lazy Approval. If the task is complete but the site column wasn't updated to a valid response like "Approved", then update the item now. That way both branches will be completed and will continue on.
We are having the same issue at the moment as we have upgraded our InfoPath forms to SP2013. Problem is the user needs to approve via the form, and before approval he has to enter not just the comments but additional field information before approving.
Has this been fixed already or any option in the nintex webservice to pass the user name manually like the GetUserProfileByName?