Virtual Business Card


A Jack of all trades is a master of integration, as such an individual who knows enough from many learned trades and skills to be able to bring their disciplines together in a practical manner, and is not a specialist but can be an expert in many fields. Such a person is known as a polymath or a renaissance man; a typical example is someone like Leonardo da Vinci.

Monday, December 5, 2011

Running large complex workflow randomly fails

This problem might be caused by the large number of Types that are created during workflow compilation, for workflows with many local workflow variables. It is more common for workflows with multiple Approval Process actions, as each preconfigured Approval Process Action comes with a large set of local variables, for the different configurable property of the Approval Process.

RESOLUTION:

By installing a CU that includes the February 2011 CU or service Pack 1 which is the ideal solution, SharePoint administrators are able to prevent compilation of workflows whose compilation would affect the performance of the farm. The default value of the property "UserDefinedWorkflowMaximumComplexity" is 7000, but can be changed based on the needs and profile of the SharePoint farm. Try setting this property to a higher value using PowerShell:

$app = get-spwebapplication "[web app url]"
$app.UserDefinedWorkflowMaximumComplexity = 8000
$app.Update()

SPContext.Current.Web.Groups.GetByID() returns Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

If you get this error, this is probably a permission problem and should return Access Denied. Try running the code
under SPSecurity.RunWithElevatedPrivileges.

Also check the group's property as by default it is set to be read by members only. Set it to everyone and you'll be sorted.