Apr 9, 2013

How to differentiate a SPD Workflow with the OOB Workflow programmatically in SharePoint

Hi guys,
As part of pre migration analysis, I have got a requirement to find the custom workflows in a web/site in 2007 env. The goal of this solution is  to generate a  report with the custom workflow details with in the web/site which were created using sharepoint designer .
This is the logic to find whether the workflow is created through designer

 private static void GetCustomWorkFlows(SPWeb web)
        {
            foreach (SPList list in web.Lists)
            {
                foreach (SPWorkflowAssociation wfAssociation in list.WorkflowAssociations)
                {
                    if (wfAssociation.BaseTemplate == null && wfAssociation.InternalName.Contains("Xoml"))
                    {
                        //SPD workflow
                    }
                    else
                    {
                        //OOB Workflow
                    }
                }
            }
        }
The base template property for the OOB (Default) workflow contains some information. But the designer workflow doesnt have the base template so it gives the null value  and also it has an internal name in the format of  xoml and cfg tags. For more information check this post.

For one of the workflow which i have created through designer these are the Name and Internal Names

Name : MySPDTestWf
Internal Name :
MySPDTestWf
<Xoml.d6bb7778_0d20_4a85_8da7_5eb6ceafcafa.2.1024.3.1024.dll>
<Cfg.d6bb7778_0d20_4a85_8da7_5eb6ceafcafa.4.1024.>


Hope Helpful...

Thanks.

Error in Installing SharePoint 2013 : Failed to Create Sample Data. An exception of type System.NullReferenceException was thrown.

Hi,

While I am installing sharepoint server 2013 on my windows server 2008 r2 i have faced this issue. I installed the prerequisites and then while running the sharePoint configuration wizard i got  this error "Failed to create sample data" .

I resolved this issue by doing these workarounds.

Check the these below 2 services started or not, if not start them

  • AppFabric Caching Service
  • SQL Server Agent for SharePoint database

And then run the below command through powershell to run the configuration wizard

psconfig.exe -cmd Configdb Create SkipRegisterAsDistributedCacheHost


Once it is completed you will see successfull message like this.