1

I'm having a problem with one of the SharePoint 2010 workflows I'm updating. One of the tasks in the workflow is assigned to a group in the site collection. When I login as one of its users and click Claim Task on the task window, the task is assigned to me, but the task status also changes to Completed (it should actually change to In Progress).

This does not happen for the other workflows I'm working on (they have tasks assigned to groups too), so I'm pretty sure this is just a weird bug in the code, but I can't find it anywhere. I see task changed and completed events, but am not finding any reference to Claim/Release task.

The workflow has a lot of code, and I'm not sure which (if any) to post here. Need someone with some basic or programmatic experience with this Claim Task function so I can find out why this is happening or know what to look for in the code.

0

1 Answer 1

0

This was a bug in the workflow code. For some reason, clicking Claim Task would cause the Submit action on the form to run, which caused an event in the workflow to make the status completed.

The fix was to add an Infopath form rule that would set a field to 1 when the Complete button was actually clicked, rather than another button on the form. Then check that value in the workflow event mentioned in the above paragraph:

onAPApproval.AfterProperties1.ExtendedProperties["txtResult"]

AfterProperties signifies that this is the value of the field AFTER the form was changed / sent back to the server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.