Is there any quick way/trick to delete around 85K entries for the workflow process history? Trying from the GUI gives a storage issue and to resolve this issue need to bounce the box.
Also trying the PowerTool crashes after a long time. Thought to ask the wider community. appreciate for your thoughts.
Thanks Vin
Which version of Tridion? 2011?
You could probably get away with a CoreService client app that does this regularly for you. By "PowerTool" I assume you mean the Purge tool?
Also - I would likely contact Customer Support about the errors you see, doesn't seem like using the GUI or the Purge Tool should fail.
If you're on 2011 SP1 you could use the following code:
using System;
using System.ServiceModel;
using System.Xml;
using Tridion.ContentManager.CoreService.Client;
namespace DeleteWorkflowHistory
{
class Program
{
private const string NetTcpEndpoint =
"net.tcp://localhost:2660/CoreService/2011/netTcp";
private static readonly EndpointAddress EndpointAddress =
new EndpointAddress(NetTcpEndpoint);
static void Main(string[] args)
{
var binding = new NetTcpBinding
{
MaxReceivedMessageSize = 2147483647
};
var quota = new XmlDictionaryReaderQuotas
{
MaxStringContentLength = 2147483647,
MaxArrayLength = 2147483647
};
binding.ReaderQuotas = quota;
var client = new SessionAwareCoreServiceClient(binding, EndpointAddress);
Log("Connected to Tridion Content Manager version: " + client.GetApiVersion());
ProcessesFilterData filter = new ProcessesFilterData
{
BaseColumns = ListBaseColumns.IdAndTitle,
ProcessType = ProcessType.Historical
};
foreach (IdentifiableObjectData data in client.GetSystemWideList(filter))
{
var processHistory = data as ProcessHistoryData;
if (processHistory != null)
{
Log("Deleting history: " + processHistory.Id + " / " + processHistory.Title);
client.Delete(processHistory.Id);
}
}
client.Close();
}
private static void Log(string message)
{
Console.WriteLine(string.Format("[{0}] {1}", DateTime.Now.ToString("HH:mm:ss.fff"), message));
}
}
}
N
If you can't use the Core Service, have a look at this blog entry, which describes using the Powershell to force workflow processes to complete. With some very minor modifications, the same technique would work for deleting workflow processes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With