Jusin


Hello,

I'm using Windows SharePoint Services 3 and SharePoint designer 2007. I've set up forms authentication and it works fine however, custom workflows fail now when attempting to set the "assigned to" field when creating a new task. For example, a user fills out a custom list and one of the fields is a person or group. When the user selects a person and submits the form it should create a new task and assign it to the person selected in the previous step. The error logged in the workflow history is "unexpected error". If I remove the "assigned to" field from the workflow then it completes successfully.

Any help is greatly appreciated.

Thanks!

Justin



Re: Workflows and Forms Authentication

Paul Galvin


The diagnostic log may provide more useful debugging information: http://paulgalvin.spaces.live.com/Blog/cns!1CC1EDB3DAA9B8AA!154.entry






Re: Workflows and Forms Authentication

Jusin

Hi Paul,

Thanks for the input. Here is the entry from the log:

System.Workflow.Runtime.Hosting.PersistenceException: Invalid data has been used to update the list item. The field you are trying to update may be read only. ---> Microsoft.SharePoint.SPException: Invalid data has been used to update the list item. The field you are trying to update may be read only. ---> System.Runtime.InteropServices.COMException (0x80020005): Invalid data has been used to update the list item. The field you are trying to update may be read only. at....

I've confirmed that this problem only occurs when trying to assign the task to a person within the custom membership provider. If I modify the workflow to assign the task to a local user then it works fine. Additionally, if I pass the value to a single line text field then the workflow will complete and set the value to membershipprovider:[USER] where [USER] is the username of the correct person. If I edit the newly created task and set the Assigned to field to membershipprovider:[USER] it will assign the task to the correct person.

I checked googled the error and there was a hotfix released for wss2 that was then distributed with wss sp2. Perhaps the error has been reintroduced in wss3. I downloaded and installed all available patches from MS with no change.

Any help is appreciated greatly.

Thanks!

Justin






Re: Workflows and Forms Authentication

Jusin

Any suggestions I can't seem to figure this one out. As far as I can tell, forms authentication is properly configured. If anyone out there has a system they could test with and confirm the same issue exists then I'll open a ticket with Microsoft for further assistance.

Thanks!

Justin





Re: Workflows and Forms Authentication

Paul Galvin

You're way outside my playpen on this one. Did you find a solution






Re: Workflows and Forms Authentication

Jusin

No not yet. I created a very basic SharePoint site with Forms Authentication and I cannot get even a simple workflow to assign a task correctly. I received a response in another post but I am not sure what to make of it, and I have not received a reply yet. Perhaps someone in this thread can clarify the response. Here is a link to the thread:

http://forums.microsoft.com/MSDN/showpost.aspx postid=2260668&siteid=1





Re: Workflows and Forms Authentication

Jusin

Well, I found a solution (sort of). I'll post it here for future reference...

When using forms authentication, a workflow will pass only the username, not the entire string required to assign a task to someone. For example, if your Membership Provider is called "memprovider" and your username is "usera" then you could assign a task to yourself by entering memprovider:usera in the "Assigned To" field. A workflow will only pass "usera" which isn't enough in a workflow to assign a task. To work around the problem, I created a workflow in Visual Studio that concatenates the membership provider name and the username.

If someone else has the same problem and needs further information on resolving the issue please let me know.

On another note - also just for reference - I have never been able to successfully implement forms authentication without a reboot even though none of the tutorials I've seen mention this problem. The error in the SharePoint logs is always the same:

PermissionMask check failed. asking for 0x00000005, have 0x00000000

A reboot fixes it every time. There isn't much out there on the Internet yet so hopefully this

ll help someone once it's indexed by Google.





Re: Workflows and Forms Authentication

jack7701

Hi,

i am also facing the same issue. the extended site with Windows authentication fires the workflow absolutely fine but the site running on FBA does not fires the workflow. Would really appreciate if you can possibly provide the solution for the same.





Re: Workflows and Forms Authentication

Jusin

Is the problem with assigning the task or is the workflow not running at all on the FBA site




Re: Workflows and Forms Authentication

jack7701

the workflow is getting fired, however the assignment is not working. i have a list "ListA" which also has a "caseOfficer" [people] field and basically on creation of any new item in the list, a new task needs to be created and assigned to the "caseOfficer" person who has been selected while creating the record in ListA. it all works smooth with windows authentciation but the moment i switch to FBA, the assignment starts throwing an error saying " an attempt to update the item with invalid data". For debugging purpose, I also tried to move the ListA.Caseofficer to TaskTitle field and it shows up fine like memprovi:userA but the same thing does not works with assignment. thanks in advance for any help you can offer.




Re: Workflows and Forms Authentication

Jusin

I¡¯ve had success assigning tasks using Visual Studio and SharePoint designer. If you are using Visual Studio, concatenate the membership provider name and the user name then use the new string as the assignee in the new task. If you are using SharePoint designer, download and install the ¡°Useful SharePoint Designer Custom Workflow Activities¡± available at http://www.codeplex.com/SPDActivities. Use the user info lookup function to lookup the ID of the assignee and the use the ID to assign the task.

Please let me know if further clarification is required.





Re: Workflows and Forms Authentication

jack7701

Thanks a ton. I managed to get things working with VS 2005 but i wanted to avoid re-coding of ALL the workflows i have done in SPD so i will try out the SPD option tomorrow and confirm it to you. Thanks for the tip..




Re: Workflows and Forms Authentication

jack7701

Hi, i really wanted the SPD custom action to work but somehow it did not work in my case. may be i am doing something wrong. I have a List - TestListA with 2 columsn [Title, Caseofficer], at the time of record creation the user also enters the name of the caseOfficer and a new task shoudl be created & assigned to the case officer but that is not happening. I am not able to do the same. what i did :
  • Custom Action - LookupSiteUserProperty and set it as follows for the Current Item
  • Lookup TestList:CaseOfficer property for TestList:CaseOfficer, store in Variable:UserName
  • and then i create a task and assign it to the Variable:UserName
It does not works. what do you think i could be doing wrong. Truly appreciate your help. If this does not works, then the problem is that i will have to rewrite ALL teh workflows which are already doen in SPD and just the volume of workflows to be re-done jitters me.






Re: Workflows and Forms Authentication

Jusin

Instead of looking up the username, look up the ID. Then use the ID to assign the task. It should work.





Re: Workflows and Forms Authentication

jack7701

Lookup the ID of what CaseOfficer is a field in ListA and the user enters the username in that field at the time of making a record in the List. I dont think that using the ID of "ListA" would help to identify the "caseOfficer". Please advise.