I'm trying to purge the contents of the workflow history list which has thousands of comments added by the some workflows (I will fix the workflows later!). I'm worried that the huge number of entries in this list is slowing down the site performance. At
this stage I do not need any of these entries for any audting or other purpose. I'm not sure of the best way to go about this.
My current strategy is to rely on the workflow autoclean sp timer job, after first running some code to set the AutoCleanupDays property of the SPWorkflowAssociation. I'm hoping that once I have run this on all the document libraries in my site where workflows
have been run I will then be able to delete the Workflow History list using the Sharepoint Web UI "Delete this list" hyperlink.
When I do this at them moment I get an error as below:
Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT)) at Microsoft.SharePoint.Library.SPRequestInternalClass.DeleteList(String bstrUrl, String bstrListName,
UInt32 dwDeleteOp, Guid& pgDeleteTransactionId)
at Microsoft.SharePoint.Library.SPRequest.DeleteList(String bstrUrl, String bstrListName, UInt32 dwDeleteOp, Guid& pgDeleteTransactionId)
If anyone can confirm whether this approach will work or if there is a better way to do this I will be very happy!
5 Answers Found
But I don’t suggest you to do it and you can just change the timer job schedule to run it more frequently.
That is not true. The "Workflow Auto Cleanup " timer job in SharePoint only deletes the workflow associations. It does not delete items in the Workflow History list.
That timer job uses the AutoCleanupDays property to determine how old the associations should be before it deletes them.
Microsoft leaves it up to us to actually delete the items in the Workflow History list...
I had the same problem with the workflow history lists getting too large. After doing some digging, I found out that the timer job (Workflow Auto Cleanup) only deletes the
association between the item in a list (Document Library / Form Library / etc.) & it's associated item in the Workflow History list. It does not delete items from the Workflow History list.
I ended up writing a console application that deletes the items from the Workflow History list, and then deletes them from the Recycle Bin. First I use it to get the list to a manageable size, then I run it on individual lists each night to make sure
they stay small.
Reply to this thread with an email address if you would like a copy of it - I'll send the source code as well.
I suspect we have a substantial workflow history list on our SharePoint Site, so I'd be interested to receive a copy of your console application and source code,.
Is it possible to send me the details also. We are having the exact same problem. Out workflow history list is huge and can not delete going through the web link.
how are you
i wish anyone could help me in this problem
i have a sharepoint sequential workflow created in visual studio
when the workflow starts i log into the workflow history list that workfow is started using the LogToHistoryListActivity
i entered the hidden workflow history list from the browser for example:
i noticed that an item is created in the above list when i run my workflow
the field Event Type in the item above has the value of Workflow Initiated but when i edit the item i noticed that the field Event Type has a value of 0
so can anyone tells me how this field works and from where it is getting itsvalues
thanks a lot
Does anyone know if there is an issue with having a
large number of entries in the workflow history list. I've got 2 sites that have
only been in existence for 9months and the workflow history lists are already at
Is this list size an issue?
Would growing at this rate cause an issue in the
Is there anything we could do about it? settings,
Any ideas/suggestions gratefully received!
This sounds bizzare, I tried it on an OOTB publishing site.
I have a page X in site A. Page X has version 1.0 and 2.0 approved and published, no minor versions anywhere. I choose to move page X to site B. Page X now has revision history version 1.0 (published and available) and version 1.1, which is exactly
the same as version 2.0 but no longer visible to the outside world.
So the first problem is that moving a page makes a previously published and overwritten version of the page content available again. If I publish the page it goes to version 2.0, but I have to remember to do this. Also because I approve the page, my user
id is associated with the publication of the content (which is sorta ok) but the original author of version 2.0 has now presumably been lost to the ether ... or the green swirling icon of death.
But I don't publish page X because I think "oops I meant to move page Y" and move it back to site A, without first publishing version 1.1. Now I have version 0.1 and 0.2. 0.1 matches the original version 1.0, and version 0.2 matches the original
version 2.0, however the best bit is that the timestamps are such that version 0.1 is now checked in
after version 0.2.
I then publish the page, I now have version 0.1 and 1.0, where 0.1 matches the original version 1.0 and 1.0 matches the original version 2.0.
Anyone else found this?Read more...
Using Visual Studio TFS 2010 on Windows Server.
Upgraded the SQLServer 2008 Enterprise to SQL Server 2008 R2 Standard and some the Tfs databses could not be accessed. Had to Upgrade the Standard version of R2 to Enterprise and then databases were ok again.
Here is the problem: When changing a file in Source Control, and check it in, and then look at the history, the copies from the history get messed up and have the content of some other files. When doing compare, it is like comparing completely different
files. The copy in the source control gets messed up also, for example you add one line to file and when you open it it looks completely different
Any idea what needs to be fixed, synchronized / adjusted?
Thanks for any help or input.
Does sharepoint put log entries into the workflow history list automatically when a workflow starts or stops? I have both custom SPD as well as OOTB workflows that get started and completes successfully, but nothing shows up in the workflow history list.
It is only when I include a Log to History step in the custom workflow that I get an entry. I don;t seem to get any entries at all for the OOTB workflows. Is there a setting that needs to be turned on?
Thanks in advance for any assistance.Read more...
I've created a custom sequential workflow in VS 2008. In the workflow I've added several LogToHistoryList activities, the description for one contains a dynamic value that is a task ID. The workflow histories do not appear in the history list until the workflow is completed. Has anyone else encountered this issue? I've tried including workflowProperties.HistoryList.Update(); to the LogToHistoryList_MethodInvoking with no luck.
After follow the link, http://vspug.com/dwise/2007/11/28/connecting-sql-reporting-services-to-a-sharepoint-list-redux/#comment-945
I'm able to pull information from SharePoint List & SharePoint Document Library from Reporting Services (Visual Studio)
But how can i connect to SharePoint "Workflow Task / Workflow History" inside SharePoint by using the same technique (Web Service)
Location of Workflow Task/Workflow History as below:
Edit > Workflows > click at workflow name under "running workflow" / "completed workflow" Please assists. Thanks in advanced.Read more...
I want a workflow to delete all list item (around 5000 items) at the end of month.
Is it possible to create a workflow in SharePoint Designer to delete all list items..?
Sharepoint 2007 SP2
I am the Site Collection Admin and Owner of the site
I have a Infopath forms library that uses a workflow associated with a task list. When I delete the infopath form, due to rejection, the Task list items do not delete. I have to delete them manually. I know this is not the way Sharepoint works. Is this a
Microsoft call support issue?
This is same issue is also happening on regular custom list associated with a task list.
I have a vacation request workflow that upon approval, creates a list item on a departmental vacation calendar in addition to the actual vacation request list. Can I create a workflow that managers can complete that will remove the item from the vacation
calendar and the vacation request list?Read more...
Is it possible to edit contents of a field using a workflow? e.g. insert a bit of HTML before and after the original field content.Read more...
I know there has to be a better way of doing this.
I am setting up a staff training intranet site. the main objectives is to keep a history of what training has been undertaken by company employees.
the solution I have at the moment is
1) create a SharePoint list item on a list called training provider ( for the provider of the training course )
2) create a SharePoint list item on a list called training ( one of the columns is a lookup on the training provider list )
3) create a list item on a list called training schedule which links the employee and the training course.
Going forward I would like the employees themselves to be able to enter the details of the training courses themselves.
I'm concerned that the above process is unwieldly/cumbersome.
Is infopath the way to go ? would a solution involving workflow be better ?
I have a requirement like i need to provide an UI to the user where in he will add a new site column with some default value.Once the site column is added i need to refer that to a specific content type.Once the reference is done,i need to update the child
content like lists who included this content type.
before doing that i need to deactivate the workflows as the content type.update implicitly updates the childs like Lists which in turn triggers workflows associated on item updated event.i donot want that.So i need to deactivate the workflows first,update
the content type and then activate it again.
How can i acheive this.I am not looking for any loop stuff like foreach statement.
Pls help me.
I have a custom workflow which gets started everytime on a list when a new item is added on that list. This workflow will create a task in the task list.
I have a field in the List Named SerialNumber and i also added a column in the task list as Number.
Now Everytime i create a New Item in the list i want to update the custom workflow taskform created in the Task List with the Current list item's Serial Number.Lets say when i initiate a form then a task named "Please Complete this task Will be created in
the task form" then in that item in the task list the correspondin field Number should be equal to the SERIAL NUMBER of the list item which initiated the workflow.
Any HelpRead more...
Hi, I have a custom workflow developed,i have made it available to designer (in actions). From the designer i will be applying this as an action to a list and set this workflow to start on new item adding. Now,what i want is in the custom activity(workflow)
code(developed in visual studio 2010) I need the list deatils(such as guid) on which the workflow is attached in designer, also need to get the item which triggered the workflow to run. What can be done for this, Can dependecy property work,but i dont want
the user to set a list name as a custom property,sicne the workflow is going to be applied by client through designer. Can i use some other dependency property like getting the context or something?
I have a situation where we have a workflow application that has been persisted using the standard SQL persistence store. We also have our own tables for storing information about running workflows and also store our workflow definitions to the database
We have a scenario where someone has deleted the records from our tables but has left the records in the SQL persistence store and the workflows include a Delay activity. The problem is that our system detects that the delay has expired and needs to continue
processing the workflow. It attempts to reload the workflow but to do this it needs the workflow defintion - which has been deleted. Therefore it can't continue the workflow and an exception is thrown.
What I want to be able to do is catch this scenario and then delete the workflow application from the persistence store. Is there any command that allows me to delete the workflow application from the persistence store? I was going to use the WorkflowApplication.Terminate
method but to do this I need to load the workflow and can't do this as we don't have the definition anymore. I was also hoping that there would be a command that I could run against the InstanceStore to delete the workflow, but haven't found one so far.
Any assistance would be greatly appreciated.
I have two lists called List A and List B. Now List A contains columns like EmpNumber, Title, Opensite(hyperlink), Panel Member etc. And List B also contains the same columns as List A, but List A has more columns than List B. Now in New
Item in ' List B" when I enter "EmpNumber" which is already in List A then all the remaining columns in List B has to fill based on that EmpNumber from List A.. For this I am writing Visual Studion Workflow, but I am not getting how to write
the C# code for this. I am new to coding.
Anyone please send me the code.
Thanks in advance
Is there any possible way to remove or delete history of a tfs project? or possible way to reduce the database size in tfs.
I want to delete the entries in the history list and suggestion list (url bar). Not all of them but some according to a filter, say date or url.
I tried using 'wininet'. It worked great deleteing temperery files and cookies but it looks like it's not working for the history list.
When I use it to delete entries the only thing that is deleted is the 'visited number' and the 'last visited' attributes. But the entry
stays in the suggestion list and the history list.