Blog Archives

SharePoint Workflow, Failed to start

My worflow failed to start. In the ULS logs I got the following message:

Category: Workflow Infrastructure
Message: System.ArguementException: Item does not exist. It may have been deleted by another user. 

According to the discussion in this thread I concluded that the »Workflow source files« (.XSN, .XOML) were Checked Out. I checked in these files and it started to work.

Final explanation on this thread was:

Basically the problem was in fact related with the versioning state of the SPD workflow files. The files in the workflow publishing process were not checked in and so no other user could access them, which lead to the errors described in the post above. And the reason for the fail in the check-in was because the list that has the workflow files has a Title field that was set to required and not Optional as it should be.

This was due to the fact that the Title field is being inherited from somewhere at the sitecollection level where it is being “Required”. We suspect that this is happening at the “Document” parent level (by default the Title for the “Document” content type is “optional”). That needs to be changed.

Solution: One needs to go to the Document content type and verify if the “Title” field is set to “Required”. If it is, click on “Title” and then change it to “Optional” and save the change (this might return an error stating it can’t propagate the change to some content types, but it propagated to the workflow lists).

Take the following steps:

  1. In SPD in the »Site Objects« pane select »All files« and then »Workflows«.
  2. Find your workflow and select it
  3. You can see that some files are checked out (green tick marks)
  4. Check In all these files
  5. My workflow started to work after taking these steps.
Enhanced by Zemanta

Configuring Sharepoint 2010 for Incoming and Outgoing Emails

Enhanced by Zemanta

Software Systems in Regulated Environments

:Original raster version: :Image:Food and Drug...

Image via Wikipedia

Some importnat links for the beginning:


Enhanced by Zemanta

SharePoint 2010 Backup scripts

Easy backup procedure can be to daily backup the farm and clean the old backups.

Backup script:

Add-PsSnapin Microsoft.SharePoint.Powershell
Backup-SPFarm -Directory \\server_name\backup_folder_name -BackupMethod full

Clean script deletes all backups that are older than 3 days

# Location of spbrtoc.xml
 $spbrtoc = "\\server_name\backup_folder_name\spbrtoc.xml"

# Days of backup that will be remaining after backup cleanup.
 $days = 3

# Import the Sharepoint backup report xml file
 [xml]$sp = gc $spbrtoc

# Find the old backups in spbrtoc.xml
 $old = $sp.SPBackupRestoreHistory.SPHistoryObject |
 ? { $_.SPStartTime -lt ((get-date).adddays(-$days)) }
 if ($old -eq $Null) { write-host "No reports of backups older than $days  days found in spbrtoc.xml.`nspbrtoc.xml isn't changed and no files are  removed.`n" ; break}

# Delete the old backups from the Sharepoint backup report xml file
 $old | % { $sp.SPBackupRestoreHistory.RemoveChild($_) }

# Delete the physical folders in which the old backups were located
 $old | % { Remove-Item $_.SPBackupDirectory -Recurse }

# Save the new Sharepoint backup report xml file
 Write-host "Backup(s) entries older than $days days are removed from spbrtoc.xml and harddisc."

In order to run the script invoke the following command in powershell (you can put this script into BAT file if you want to run it from the command prompt) :

powershell -command C:\BackupScripts\Script\CleanOldBackups.ps1

We have to run Backup and Clean scripts daily. We can do this by using “Task Scheduler”. Put the call of both scripts into separate BAT files.

Scripts are written in PS1 files.

We call above scripts from BAT files.

Then take the following steps in order to setup daily farm backup.

1. Run the Task scheduler

2. In Task Scheduler create new task (Action / Create Task)

3. Setup the task (here are some screen shots):

See the following links as well:

Enhanced by Zemanta

SharePoint 2010, Site Workflow

Site workflow is connected to the site and we can use it to perform actions on different lists, libraries and items. In this short description I provide information how to create a new item on a list by using “Site Workflow”.

At first we create a custom list with the desired columns, which we will use in this example. Let say we have a list of ideas, that are submited by employees.

Now start editing the site in designer (SiteActions/Eidt in SharePoint Designer).

Create a new site workflow (Workflows/Site Workflow icon on ribbon). With this workflow we will “Create item” on the “Idea” list.

We will create a new item on one of the lists on our site. In our example it is “Ideas” list. We have to provide the user a special form to fill in the data, because our workflow is not connected to the list of ideas. If we would use a new command directly on the list, the new item form od that list is displayed. But in this case we have to use “Initiation Form Parameters” command. When the dialog opens, we have to add all the fields that we need from the user to fill in in order to create a new item on the “Idea” list.

Now select the desired list and connect parameters with the “Idea” list columns. In this example I connected only one filed (only Description filed; other columns take default values or are calculated).

When the workflow is finished, save it and publish.

To find the site workflows, follow the next pictures:

When you start the workflow, the following form opens. Fill it out and finish the form.

The result is a new item on the “Idea” list.

You can redesign form by using InfoPath Designer tool. Open the form from the SharePoint Designer.

Edit the form (e.g. insert text, format fonst, insert pictures etc.). When you finish editing, publish the form back to the workflow. How to do this properly you can see on the second picture.

Now invoke the site workflow once again. You will get the new form:

Of course, you won’t use “Site Workflow” just to add new items to the lists. It is just an example, how we can use workflows that are not connected to listst or content types and do actions on items in different places around one site.

There is one other important thing and that is how to simply invoke the workflow from anywhere on the site, by clicking on the link. Simply, copy the current explorer address when the site workflow initation form is opened and use it on menu or quick launch.

Enhanced by Zemanta

Building SharePoint Workflows with SharePoint Designer and Visio

SharePoint Workflow Authoring in Visio Premium 2010 (Part 1) – Visio Insights – Site Home – MSDN Blogs.

SharePoint Workflow Authoring in Visio Premium 2010 (Part 2) – Visio Insights – Site Home – MSDN Blogs.

Transfer workflows between SharePoint Designer and Visio – SharePoint Designer – Microsoft Office.