.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

workflow runs when item changed even though only 'Automatically start ... is changed' is unselecte

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :C#

We have an SPDesigner workflow on a form library in SP2007 SP2 (& some CU updates).

Its 'Automatically start this workflow whenever an item is changed' is unchecked.  The other 2 options '...new item is created.' and '... manually started...' are checked.

We add an item into the list.  The workflow starts.  We see the 'Approval Workflow Started' in the workflow history.  And approver then approves the item, and in the workflow history, we then see the 'Approval Workflow Started' again.  It's as if the workflow has restarted. 

This errant behavior seems to have started when we added an if condition in second step of our workflow:

If Checked Out to is not empty

 Log xxxyyy to workflow history

 then Wait for Checked Out To to be empty 

Is it a known bug in SP2007?


A little more info on this:

We have a workflow step that :

Store https://url/blah in Variable:Blah URL

  then Check out item in OurFormLibraryName

  then Set Approval Status to Awaiting Approvers Approval

  then Set ... another field value ...

  then Check in item OurFor

View Complete Post

More Related Resource Links

Workflow does not start when the Item is changed


I have designed a three level workflow and selected both "Start a workflow whenever an item is created" as well as "start a workflow whenever an item is changed". Now whenever a workflow is in between, say approved by fisrt approver and waiting for second approver and if the workflow item is changed, then the workflow does not start again. But once the workflow is completed and the item is changed then  the workflow starts again.

Does this mean that whenever a workflow is waiting for "OnTaskChanged" event and if we change the item manually then it will not start again from the beginning?

Its really weird as i always thought it will work. But when i tried to start the workflow again whenever an item is changed (Workflow not completed, still waiting for the second approver to approvce the task) then it does not start again.

I tried to use a OnWorkflowItemChanged event in my State Machine Workflow but i have found that OnTaskChanged and OnWorkflowItemChanged events never work together.


how do I create a workflow that will launch when any item in a document set is changed?


I want a workflow that will run some code when any item in a document set is touched.

How do I do this?

Attach Workflow to Task List, don't get option to manually start workflow via dropdown on task item



I am running WSS 3.0 with other workflows which are functioning correctly.  I created a new workflow in Visual Studio 2008 and was able to successfully run it in my dev environment.  I attached the workflow to a task list in my dev environment and was able to manually start the workflow by using the drop down workflow option and using the menus to manually start it.  I installed this workflow in our production environment and attached it to the task list (which had a SPD workflow attached to it which stopped working about a month ago).  I made sure that the option to manually start the workflow was checked.  When I tried to manually start the workflow, (hover mouse over title, drop down) there isn’t a workflow option.  The workflow also will not start automatically when a task is changed.


I attached this same workflow to a different task list in production and get the option to start it.


I have tried creating a small workflow in SPD 2007 and attaching it to the task list.  It shows that it is attached, when I look at the workflows that are attached to the task list, but I still don’t get the option to manually start it.


I have checked my security and I have fu

Workflow "Failed on Start (retrying)" when new item created by BizTalk SharePoint Adapter


We've been using the BizTalk SharePoint Adapter to load various different contents into a MOSS 2007 Document Library. The library has a Microsoft Office SharePoint Designer 2007 workflow (sequential workflow created in Designer) which starts automatically when a new item is added to the Document Library. Or, at least, it eventually starts automatically.


For some unknown reason--and this is what we're hoping some of you may have some ideas on--the workflow fails to start on the first try, producing the "Failed to Start (retrying)" message. When the timer job comes back the second time, the workflow starts successfully, but this causes us to loose five minutes of potential work time (not to mention making us look bad to the VPs and CTO because they see the failure message).


In checking the log, I find the following pair of error messages each time the "Failed to Start (retrying)" status occurs:


08/27/2007 13:49:43.24  w3wp.exe (0x0CA0)                        0x1438 Windows SharePoint Services    Workflow Infrastructure        72fs Unexpected RunWorkflow: Microsoft.SharePoint.SPException: <Error><CompilerError Line="1" Column="1" Text="The root activity type is invalid.&q

Workflow - automatically create discussion item using title field of of custom list item as its subj

Anyone any ideas as to how I can configure SharePoint to create a discussion item using the title of a list item. e.g. user creates list item on a custom list - SP automatically creates a Discussion thread for this list item in the discussions list. I'm guessing this can't be down OOTB . would I be looking at SPD or a coded solution ? regards, Counie

Control positions in the Form are changed automatically.

Hi All, I am developing an UI Form which is having many text, label, combo box controls.  As i have many controls to be placed in the screen, so the form is exceeding one page and i need to scroll. Problem i am facing here is, when every i execute the form all the controls are relatively moved down wards by leaving a blank space on top.   Please help me how to come out of this problem, and i am very much new to C# UI development.   Thank you in Advance.

Workflow for "Item Created" never runs when Admin creates new item


On all the Workflows I've used in SharePoint 2010 - OOT and SharePoint Designer workflows - I noticed that when the workflow is associated to the "item created" event on a list the workflow never runs if the administrator creates a new item in the list, but it runs if a "normal" user creates an item

Is this by design?

How to take the scripts of the changed SPs/Views/Temp tables/Functions automatically?



  We have a huge Database with more than 100 tables , more than 150 SPs.We are 10 members and we will be creating/deleting/updating SPs , functions, views, tem tables  everyday. Actually at the end of the day, we have to send the  scripts of latest SPs,functions,views,Temp tables to the server. So far what we are doing is  we manually go to the SQL server Scripts Wizard and selecting one by one all the SPs,functions,TTables and views. Is there any quicker way to take the changed stuffs instead going manually?

Incoming email does not start the workflow automatically



I have created a blog site and email enabled the "posts" list. whenever the new email comes, it should start the workflow and write a log message. I can start the workflow manually but it is not starting automatically. I am working in MOSS 2007 SP2. I have also set the declarativeworkflowautostartonemailenabled to "true", but still no luck.  Please let me know if you need any further information.



SharePoint 2010 Long Starting if start workflow programatically


In SharePoint 2010, I'm starting workflow #2 programatically from my workflow #1. See code below:

					SPList currentList = web.Lists[new Guid(ListId)];
					SPListItem currentListItem = currentList.GetItemById(ListItem);

					//resolve any lookup parameters
					string workflowId = base.ProcessStringField(WorkflowIdentifier);

					//find workflow association by name
					SPWorkflowAssociation workflowAssoc = currentList.WorkflowAssociations.GetAssociationByName(workflowId, Thread.CurrentThread.CurrentCulture);

					if (workflowAssoc != null)
						//start the workflow
						SPWorkflow workflow = site.WorkflowManager.StartWorkflow(currentListItem, workflowAssoc, workflowAssoc.AssociationData, SPWorkflowRunOptions.Synchronous);

And workflow #2  will hang with Starting status (1-10 minutes), Then the workflow #2 status would be modified  to Completed.

I couldn't find how to start the workflow # 2 immediately and complete immediately without several minutes delay

Workflow Task And Relevant List Item


Hello there...

1. What is the name of  the field thats connect between the task item and  the list name or guid and the list item id or guid

2. SPD: how can when starting the workflow how can i ensure that the initial form variables will be saved at the workflow task list

Many Thanks



Assigning users when creating a list item in a workflow


I'm using a workflow to assign tasks to users.  When I try to assign the task to a group (set in the workflow designer), the workflow gives me an error.  When I change the assign to property to a single user, the workflow works perfectly.  How do I get the workflow to assign the task to the group?  Or if that's not possible, can I get it to assign it to more than one user?


Automatic Workflow start through Excel


Dear all,

I have a SPD WF and I want to start it automatically by channging a value in a dropdown inside Excel.

Instead of going to Office button --> Workflows --> Start "Budget Approval", start the workflow by setting a value inside Excel (and maybe saving the file) to "Completed".



VS Studio WorkFlow Failed on Start in MOSS 2007 ON Windows Server 2008 64 Bit


I have created a sequential sharepoint workflow in WSP Builder in my Sharepoint Server and Deployed it.

But the workflows says Failed on start and retrying ans stops there forever says couldn't start the workflow.

I repaired .NET Framework 3.5sp1 installed

 tried this

 1. I tried again, in C Prompt:  Lodctr "c:\Windows\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\perfcounters.ini"  it says initiation file cannot be found

2   i again tried this C prompt Lodctr /R "c:\Windows\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\perfcounters.ini"

it says reloaded  from the system restored

i am still getting the same error.

When i manually go to my  C:\Windows\Microsoft.NET\Framework\v3.0\Windows Workflow Foundation i can see a folder for SQL that's it nothing more than that..

I dont know what is happening i am trying it from 2 days and still no solution.

any ideas would be real great help for me.

My system is 64 bit , Window server 2008, MOSS SP2, Visual Studio 2008 Version 9.0.30729.

.Net Framework 3.5 sp1

and WSP builder the one from Codeplex for 64 bit machines

Setting size of Grid Since Ajax Resizer Changed It


I'm sure that wasn't a very good subject, but I couldn't think of a better one. What I have is a page that has an UpdatePanel on it with a GridView control in it. It was originally displaying at a particular height and width according to the CSS style I have setup for it in my style sheet. However, since adding an AJAX Resizer control to the UpdatePanel, it is now defaulting to a much smaller size.

How do I get the grid to default to that same height and width that is in its CSS class? I don't mind putting it in the ASPX page or whatever, just need the grid to default to a larger size than the small little box it defaults to since adding the AJAX resizer. 

output cache to be used only when parameter has changed + old question of user control not answered



i have 2 questions about output cache:

1.is it just me , or does it seems that it is used only after the second time that the user reaches the webpage? if so, why, and how can i tweak it to my needs? my guess is that it wouldn't be logical to cache every time a user reach a webpage, but only when it happens enough times.

2.i know that i can use "varybyparam" for using the output cache when the parameter doesn't change , but it seems that it would use the output cache even if there is no parameter , or if the specified paramter is not there. is there a way to overcome this?

3.an old question that somehow marked as "answered" , yet i didn't solve : suppose i created a user control and i gave it values through the CTOR via the aspx file . is it possible to show the values from within the split/design mode? remember that i've talking about ASP.NET and not simply C# winforms . i write this because this question was on :


and the answer that i got was for C# and winforms . i've tried to do the same for ASP.NET , but i've failed.

can anyone please help me?

SQLCMD: supress "Changed database context to . . ."

Product:  2008 SQL Server Standard Edition. Shell:     SQLCMD (i.e. sqlcmd -i"test.sql")Script (test.sql):   use Master;   print $(SQLCMDERRORLEVEL)The screen output is always:   Changed database context to 'Master'   0However I want the above output to be (only):   0I have tried calling SQLCMD with the -m command line parameter set to each of the {-m-1, -m 0, -m 1} settings, but none work. I have tried: set SQLCMDERRORLEVEL = each of {-1,0,1,25), but none workAnybody know the secret?Thanks in advance,Jerry
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