.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SharePoint Custom WorkFlow never stops

Posted By:      Posted Date: October 18, 2010    Points: 0   Category :SharePoint

Hi there,

As you can see in the title bar i have a problem with my custom workflow created in VS2008 which is associated with the custom list.

So, what my workflow actualy doing:
We have a list (custom list) of projects - any of them has a collection of documents in a document library grouped to project name.
When user edit a selected project in a custom list (projects) the WF have to move their documents to the second document library called Archive. At WF start the status is automaticly set to "In Progress".

Anything going well, but sometimes WF does complete normaly, and sometimes does NOT complete - it's status is still "In Progress" even the documents are successfuly moved to other doc.library.
Any activity that I put after this code activity does not get executed.

So the question is, whats going wrong there or can I programaticly stop my WF with status "Completed"?

Thanks for the answers.


View Complete Post

More Related Resource Links

Sharepoint Wiki Custom Workflow


Has anyone done custom workflows for a sharepoint Wiki page? 

The workflow I'm trying to do is, whenever a new wiki page is created I want a new Discussion page  to be created for that wiki page?

Any Help?

Unable to attach a custom SharePoint Workflow to a Content Type


I am working with SharePoint Server 2010 Beta 2, Visual Studio 2010 Ultimate RC and SharePoint Designer 2010 Beta.

I built a custom Content Type based on the Item type with a few custom site columns. I also have built a custom Sequential Workflow using Visual Studio 2010. This is a relatively simple workflow that creates a task, waits for the task to complete, sets the workflow to complete. I am able to deploy this workflow to the site collection through VS 2010.

The problem I have is that when I try to associate my custom Content Type with my custom workflow, that workflow is not listed in the workflow templates to select. There are only the OOTB SharePoint workflows to choose. However, if I create a list and associate a workflow to that list, my custom workflow is listed in the workflow template list.

This makes sense since at the start of building a custom workflow in VS2010, one of the first questions is whether the workflow is a Site or a List workflow and I selected List.

I did a little research and found some who wrote that Reusable Workflows may be attached to Content Types.  In VS2010, there is no option to build a Reusable Workflow.  That is only possible in SharePoint Designer.  However, it is possible to import a SPD workflow into VS, so I tried that.  Imported the WSP into VS201

Problem while creating task with custom content type in sharepoint workflow


Hi all,

I am trying to create task with custom content type in sharepoint statemachine workflow. But it is showing "Error Occured" after task creation code is excecuted. can anyone tell me what is the problem.

Task Content type


  <ContentType  ID="0x01080100A707C0079E8547c0A87515457DB90629"
      Description="Workflow Task"
      <FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" Name="MyComments" DisplayName="MyComments"  />
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
        <FormUrls xmlns="

SharePoint Designer Workflow to email multiple recipients listed in a custom list


Hi all,

I created a workflow in designer attached to a form library. I also have a custom list "Admins" containing names of persons that serves a different purpose but would also like to be used as recipients for the workflow email everytime a new item in the form library is created.

I have been searching the net and tried out few work arounds but so far able to send to only one person in the "Admins" list. The list has a column "Admin Name" which is of type "Person or Group".

Thanks in advance!

Custom Task form of a SharePoint Designer workflow is not displaying correctly


We have created a custom workflow using SharePoint Designer. We are using one action “Collect Data from a User”. As you know, this action sends an email to a user with a link to a task form where user is supposed to accept or reject a request. We are encountering following issues with this form:

  1. Form is not a workflow form, it is a task item of the task list that the “Collect Data from a User” action of the workflow creates.
  2. Form opens as an item of the workflow task list in View mode (DispForm.ASPX) instead of Edit mode (EditForm. ASPX)
  3. When user clicks on “Edit Item” button, it displays all the fields of the task as editable – we want only the Approve/Reject option buttons and the comments TextBox (that we created during the workflow design) to be displayed as editable

Can someone please explain what is going on and how can we resolve the above issues?

Problem validating StringBuilder fields in SharePoint 2010 Custom Workflow Validators


One of our custom SharePoint Designer workflow activities, which have always worked fine in SharePoint 2007, fails to validate.

This appears to happen when a Workflow Activity that contains a StringBuilder field also contains a lookup variable.

<FieldBind Field="CustomCode" Text="this code" Id="1" DesignerType="StringBuilder" />

For example when we store the following in this StringBuilder field

"Today's date = [%Current Item:Transaction Date%]"

This field returns 'null' in the ActivityValidator. As a result we cannot validate its contents.


How to update workflow status in a custom workflow using SharePoint Designer


We have created a two-level custom workflow using SPD as follows:

Submitter submits request form in a form libraryàApprover A approves/rejectsàApprover B approves/rejectsàSubmitter receives an email and workflow stops

Exception: If Approver A rejectsàsubmitter receives email and workflow stops

Question: Users may have noticed that the default view of the form library has a column with the same name as the workflow. Let us call our workflow as “WF1” So the default view of the form library would show a column named WF1. When yo

Does Useful Sharepoint Designer Custom Workflow Activities work across servers - pls HELP


Not usre if this is the right place to post this but sure many guys must have used this
I have a siteA at



and Site B at



when i try and use the
Copy List Item Extended Activity to copy the list items across i keep getting error:

System.IO.FileNotFoundException: The Web application at http://myserverA/sites/pop/lists/mylistname could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.

My AAM looks like this:

Internal URL                  Zone        Plublic URL for Zone

http://myserverA:8080    Default     http://myserverA:8080

http://myserverA.domainname:8080  Default  http://myserverA.domainname:8080

http://myserverA.domainname:2020 Default     http://myserverA.domainname:2020  -- this is been extended for FBA

Any ideas what i ne

Workflow for custom alert on Sharepoint 2010 Calendar



I'm trying to create a Workflow in Sharepoint Designer to send an alert (e-mail) to the group manager of a certain resource every time an item it's created/modified on calendar and it's resource is included. How should I begin this?

Thank you,

Upgrade Sharepoint 2007 Custom State Machine/Sequential workflow to SharePoint 2010



What's the path for upgrading the SharePoint 2007 Custom State Machine/Sequential workflow to SharePoint 2010 when the current SharePoint 2007 environment is upgraded to SharePoint 2010 by an inplace upgrade?

What's the typical estimate time for upgrading SP2007 custom workflow to SP2010 custom workflow?  My gut says 40 to 80 hrs or even less than that, what’s your thoughts?

FYI...I tried to upgrade the SharePoint custom workflow built using visual studio 2008 in SP2007 environment to visual studio 2010 solution/project in SP2010 environment, I got the error messages to refer the following dll's

Microsoft.SharePoint.dll and Microsoft.SharePoint.WorkflowActions.dll

Even after referring the new dlls still the workflow design doesn't show up in the canvas...still work on this to fix mean while want to know the experts insights on this.

How to use custom WrkTaskIp.aspx page in custom sharepoint workflow ?


I have created as custom task edit browser enabled Infopath form which successfully gets open when user clicks on Edit task. But by default it opens up in the WrkTaskIP.aspx page which is available in 12 hive..Layouts folder.

Now the default WrkTaskIP form provides two following options as hyperlinks 1. Delete item, and 2. A link to navigate to the task display form

I want to customize the OOB, WrkTaskIP page and associate that with my workflow.

How exactly can i achieve this ?

P.S: I have refered this link , but that does not specify clearly where exaclty to associate that custom page in the workflow and how.


SharePoint custom workflow sending duplicate task assigned emails


I'm running into an issue where a custom sequential workflow I've built in VS2010 is sometimes sending duplicate emails to the user to whom created tasks are assigned. Note: this is a Site workflow not a List workflow, in case that matters.

It's a pretty simple flow: i've got an InfoPath initiation form, and am using an OnWorkflowActivated workflow action to take the data from the form and popluate some workflow variables, then I've got a CreateTask workflow action that sets the AssignedTo value on the Task Properties, along with some other Task Property values.

The task gets created successfully in the task list, and in most cases a single email goes out to the person the task is assigned to. However, sometimes (and I haven't been able to figure out what is causing the difference) up to 3 duplicate messages are sent out, as well.

I've seen other posts in the forums where this sort of thing is happening with OOTB workflows ( this thread, for example: http://social.msdn.microsoft.com/Forums/en/sharepointworkflow/thread/66f94e07-a690-4166-aaeb-b7f5bc424fe4?prof=required). However, duplicate tasks are not being created (unless I'm missing the duplicates somehow -- they're not showing in the task li

custom workflow visual studio 2010 for SharePoint 2010


Hi Everybody,

I have written a custom workflow in visual studio 2010 with custom Task Edit Form which is associated with content type and that content type is in turn associated with Task List. When an item is created in the target list to which my custom workflow is attached, a task item is created when I click on that task item it loads the custom Task Edit Form page where I have defined the UI and on click of Approve button I just Alter the task by using method SPWorkflowTask.AlterTask(this._TaskListItem, taskHash, true); when this line executed it executes the Task Changed invoked method where I am taking true and false value from the UI and updates the corresponding metadata in target list.

The problem is when I create 2 target list items their workflow status becomes pending and when I approve one of them, both the items get approved i.e. Task Changed event get called 2 times and both line items workflow status become completed. The task list item corresponding to one approved get 100% completed but other one did not show its completion.

Custom Workflow Approval form creation in SharePoint 2010


How to create Custom workflow approval form in sharePoint 2010.?

I have to create serial approval workflow with 3 stages,

1. In each of approval stage, Approver has to approve and update the value in the SharePoint List.

2. Workflow email should have email link to workflow list item.


Please let us know how to achieve this. Is this possible using Out of Box workflow?







Marulasiddappa SB (Swamy)

Create custom workflow using Managed Metadata and Sharepoint Designer


Hello all,


We have a very specific question from one of our customers concerning managed metadata and workflows that I can’t seem to figure out. Maybe you could give me a hand. This is the situation:


They want a taxonomy store with managed metadata. The departments of the customer are stored here (in a branched way). When a user adds an document to a document library he or she has to fill in the metadata field for the department so it will be connected to this document. Depending on the department they want to assign an approval task to a different manager.


the joy of writing a custom workflow activity for SharePoint Designer...


So, I need an activity that will replace some old text into new text in a given string.
Not present OOTB in SharePoint Designer, so - oh boy! oh boy! - we can develop it ourselves using Visual Studio!

Ok great, I did some reading about it on SP2007 in the past, but never needed it, so never actually tried it.
Now I'm on SP2010, so I googled again to find guides on how to write my very first custom workflow activity to use in SharePoint Designer 2010.
Nothing to be found.... The few posts about 2010 were only stating that it works still the same as in SP2007, and to look for guides on 2007.

Ok, so I googled some guides on how to do this in SP2007. I found one from MSDN, perfect to start with you'd say: http://msdn.microsoft.com/en-us/library/cc627284.aspx 
But really, it doesn't work the same... When I create an Activity Library project in VS2010, I don't have a class, like in the guide. All I have is a xaml file, no cs at all, and I have absolutely no clue what I should add in order to get the same class as in the guide. Adding a regular class is not it, since in the guide they're using a partial class. So I'm blocked 5secs after I started reading the guide... just great.

I'm so fed up with the lack of information on development for SharePoint. I hit

Unable to create task using Custom task Process Action in Sharepoint Designer 2010 workflow

Problem : In Sharepoint Designer 2010, we are working on creating reusable workflow.
In workflow we are using "Start Custom task process" action. It has been observed that,all of the sudden it behaves weirdly. It creates task but without any number appending to taskform.for eg. when we create task it generally shows "Start Task(1) process on Current Item with these users" However now it does not provide any number with Task. It shows "Start Task process on Current Item with These users"
In task form , it does not allows to add task forms fields from existing fields nor allows to create outcomes.
Thus we are unable to create any new workflows or edit and enhance exisitng workflows in the site.This is showstoper for project. Client wants to use sharepoint designer exclusively to develop workflow.
When we tried to create workflow (Sharepoint designer) in a new site with new list it allows us to create custom tasks process. 
Resoultions approaches done so far.
1) Took backup of site on local box from Server and tried to create custom process task but not able to do it.
2) On Server removed all unwanted workflow status columns from the tasks list but still not able to create custom process task 
3) Took backup and t
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend