SPWorkflowTask.AlterTask
(1)
SPWorkflowmanager
(1)
SPListitem
(1)
Visual Studio 2008
(1)
SharePoint
(1)
€œOnTaskCreated”
(1)
UpdateTask
(1)
CreateTask
(1)

Task is locked issue in workflow

Asked By Rish
22-Aug-08 05:24 AM
Hi All,

I am facing the following two problems on custom workflow.

Background: The Sequential workflow has been developed using Windows
Workflow with Visual Studio 2008.



Use Case: Need to assign multiple users to a Task using Sequential Workflow
so that any one of the users can pick that task and start working on that
task.



Approach Used: To achieve above requirement, we have performed following
steps:

We have selected the Yes radio button for “Allow multiple selections” option
for the Assigned to column in the Task list in SharePoint.
To create task, we are calling the Modify Workflow function of
SPWorkflowmanager object model API.
We are passing the multiple “Assigned to” user name like
(1;#Test1;#2;#Test2) to assign the task to multiple users.
So we have used Share point API to set multiple assigned to. (We have used
SPListitem and Update method).
Now, once user try to change task using SPWorkflowTask.AlterTask fucntion.
And then call the UpdateTask to update the task in the Workflow.


Issue: When the radio button for “Allow multiple selections” option for the
Assigned to column in the Task list in SharePoint is set to Yes, then

Now, once user try to change task using SPWorkflowTask.AlterTask function.
Nothing happens as Sharepoint locks the task and it is no more updateable.
If we set the radio button for “Allow multiple selections” option for the
Assigned to column in the Task list to “No” then above requirement works
fine.


Note: Another issue we are facing is that the “OnTaskCreated” Activity is
sometimes not firing for the corresponding CreateTask activity. The
CreateTask and OnTaskCreated activities have been put in a Custom activity
and the Custom Activity is part of a Replicator activity

Thanks and Regards,
rishi

Hi Rishi!

Asked By dbuja
22-Oct-08 04:05 PM
Hi Rishi!

Did you resolve this issue - we are having the same problem and I'd
appreciate if you could share what the fix was?

Thanks!
Dejan

Hi,I have removed OnTaskCreated activity.Then it works fine.

Asked By Rish
24-Oct-08 11:14 AM
Hi,

I have removed OnTaskCreated activity.

Then it works fine.

Thanks and Regards,
rishi

I meant the 1st issue (task locking when "assigned to" allows multiple users -

Asked By dbuja
24-Oct-08 05:54 PM
I meant the 1st issue (task locking when "assigned to" allows multiple users
- works fine when only one user can be assigned, locks when multiple users
can be assigned - even if I assign just one)

I can't seem to make it work for me...

Thanks for your help!
Hi All!
Asked By shabi
03-Feb-09 07:15 AM
Hi All!

Did u find any solution for this, i need to assign task to multiple users
but it dosen't allow me to neither completetask or AlterTask method
Thank you a lot......
Asked By mehul trivedi
23-Jul-09 04:55 AM
You are required to be a member to post replies.  After logging in or becoming a member, you will be redirected back to this page.
Post Question To EggHeadCafe