Today I was working on a clients Sharepoint site and we had to upload a bunch of files and kick off a workflow through code for each file.  I was able to upload the files fine and start the workflow, but the workflow would always be stuck and its state would say that it was "Starting".  I knew that the workflow itself wasn't the problem because I could manually start the workflow from the UI and it would run through successfully. 

Since we were using a custom 3rd party Sharepoint workflow package, Nintex Workflow 2007, I figured I would try a vanilla built in Sharepoint workflow.  So I tried to create an Approval workflow.  I got to the page which lets you select the type of workflow, the name, etc.  When I hit the next button though, I was given a page that said "The form cannot be displayed because session state is not available".  Needless to say I was LESS than pleased. 

After some searching of the web I found out that a lot of the times you'll get this message if you don't have a Sharepoint Shared Services Provider (SSP) created and active.  I opened my Sharepoint Central Administration site and looked under the  "Shared Services Administration" on the left hand nav bar.  Sure enough, nothing was listed, so I went to the "New SSP" on the toolbar to create a new one.  I followed the steps (you can search the web for more detailed explanation of all the configuration settings, etc. for a Shared Services Provider) and created a new Shared Services Provider.  It took a REALLY long time, I mean REALLY long time, like 10 minutes long.  Once it was done it told me it encountered an error and that it would continue to try and create the SSP but I would have to fix the problem why it wasn't created.  Of course, I had no damn clue why it didn't create successfully in the first place!

When I looked at the screen for the SSP's, I saw the one I created, but it said "(Provisioning in Progress)" next to it.  So I let it go for about an hour to see if just needed more time.  As with everything else that day, nothing worked.  So I set out on the web again.  Turns out that if you don't have the "Windows Sharepoint Services Timer" running, the "Provisioning in Progress" message will never go away, and your Shared Services Provider will never 100% finish being created. 

There are a few ways you can make sure that the "Windows Sharepoint Services Timer" is active and running.

1) Click the Start Button, All Programs, Microsoft Office Server, and select Sharepoint Products and Technologies Configuration Wizard.  Once you start the wizard follow the steps and it will run through the configuration and in addition to other things, it will Start the "Windows Sharepoint Services Timer".

2) This is probably the easiest way.  Open a command prompt and type

NET STOP “Windows SharePoint Services Timer Service”
NET START “Windows SharePoint Services Timer Service”

 

After your done and the SSP finishes "Provisioning", you should see a screen similar to the screenshot below (your sites/ports will obviously be different)

image

 

I also read that a lot of people stop the “Windows SharePoint Services Timer Service” because it eats up a lot of ram and apparently has a known memory leak.  So some people just start/stop it as needed or setup a monitor using Microsoft Operations Manager (MOM) to restart the service once the memory hits a certain threshold.

So after all the above, I was able to successfully create the Shared Services Provider (SSP).  After that, I was then able to enable session state for my sites.  So now I was back to my original problem, the workflow's stuck in a "Starting" state after being set to run through code.  I reran my app which uploaded the files and kicked off the workflow's.  They files still showed "Starting" next to them.  I decided to take a quick walk instead of breaking my computer.

Luckily when I came back I refreshed the page and the workflow's showed their status as "Completed"!  I decided to rerun my app again and this time watch the Task Manager.  Once the files were uploaded, and the workflow's set to run, after a minute or so I saw the processor/ran spike, I refreshed the page, and the workflow's were changing their status's to "Completed" as each was done. 

So the “Windows SharePoint Services Timer Service”  apparently tells the workflow manager to start up any workflow's that have been set to run.  Running the workflow's manually must force the workflow manager to execute, whereas through code it does not.


Posted in:   Tags:

Comments


January 20. 2008 08:44
pingback
Pingback from tonytestasworld.us

Sharepoint 2007 Workflow stuck in "Starting" state and never completes when set to start programmatically

http://tonytestasworld.us/post/Sharepoint-2007-Workflow-stuck-in-quot3bStartingquot3b-state-and-never-completes-when-set-to-start-programmatically.aspxhttp://tonytestasworld.us/post/Sharepoint-2007-Workflow-stuck-in-quot3bStartingquot3b-state-and-never-completes-when-set-to-start-programmatically.aspx


United States Edward
May 13. 2008 18:03
Edward
Of all the searching that i've been doing on the we for the past 2-3 days, your blog is THE FIRST to mention anything about the Sharepoint Services Timer thing.

Now i think im on the right track. And hopefully my SSP's will complete!!!

Thanks!

no site


July 5. 2009 16:30
club penguin cheats
Of all the searching that i've been doing on the we for the past 2-3 days, your blog is THE FIRST to mention anything about the Sharepoint Services Timer thing.

http://www.club-penguin.org/http://www.club-penguin.org/


January 25. 2010 07:15
fast cash loans
We need men who can dream of things that never were.

http://cashusloans.com/cash-advance.htmlhttp://cashusloans.com/cash-advance.html


January 25. 2010 07:20
cash loans
The major reason for setting a goal is for what it makes of you to accomplish it. What it makes of you will always be the far greater value than what you get.

http://cashusloans.com/payday-loans.htmlhttp://cashusloans.com/payday-loans.html


February 1. 2010 08:05
Loans in North Carolina
It's always too soon to quit.

http://superpaydayloan.com/state/North-Carolinahttp://superpaydayloan.com/state/North-Carolina


February 1. 2010 08:11
Loans in MN
Success is the maximum utilisation of the ability that you have.

http://superpaydayloan.com/state/Minnesotahttp://superpaydayloan.com/state/Minnesota


February 4. 2010 22:21
international logistics
I would love to read more about this topic.Don’t stop blogging! It’s nice to read a sane commentary for once.Excellent read, I just passed this onto a colleague who was doing a little research on that.

http://www.osishipping.com/http://www.osishipping.com/


February 8. 2010 05:26
no fax loans
Vision without action is merely a dream. Action without vision just passes the time. Vision with action can change the world.

http://cashusloans.com/http://cashusloans.com/


February 8. 2010 05:31
online payday loans
It is an ironic habit of human beings to run faster when we have lost our way.

http://cashusloans.com/online/payday-loans-online.htmlhttp://cashusloans.com/online/payday-loans-online.html


February 9. 2010 02:52
instant payday loans online
The winners in life think constantly in terms of I can, I will, and I am.

http://fastloansus.com/PaydayLoans/instant-payday-loans-online.htmlhttp://fastloansus.com/PaydayLoans/instant-payday-loans-online.html


February 9. 2010 02:57
payday loans
All who have accomplished great things have had a great aim, have fixed their gaze on a goal which was high, one which sometimes seemed impossible.

http://fastloansus.com/http://fastloansus.com/

Search Blog

Blog Roll

    OPMLDownload OPML file

    Recent Comments

    Banners

    Theme Grabber
    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2010 Tony Testa's World