A migration package won't migrate anything without a workflow. The workflow determines the logic that applies to each file and folder that is processed in the source location, such that the item is either migrated or ignored. If the item is to be migrated the workflow specifies a provision activity which determines the SharePoint object that should be created for the source item.
Click the Workflow... button in the package window to see the workflow:
This displays the Workflow Designer window which hosts the Workflow Foundation 4.5 designer. The workflow is invoked for each source file and folder so should be designed with this in mind.
The Basic Package (folders) workflow allows you to migrate folders and files or emails and reproduce the source folder structure in SharePoint.
Migration workflows contain three arguments that provide and return data from the workflow activity:
- The SourceItem provides access to the item currently being processed.
- The MigrationTarget represents the target SharePoint environment where items are migrated.
- The ProvisionObject is assigned by the workflow if the item is to be migrated.
Generally speaking the workflow should leverage SourceItem properties in order to determine the appropriate ProvisionObject. This is most frequently achieved via 'Control Flow' activities that contain one or more expressions (see If Condition in screenshot above).
The expression editor supports completions and expects VB code expressions:
Use Ctrl+Space to explicitly display completion suggestions.
A workflow can assign the ProvisionObject Out Argument by executing one of the 'Provision' activities from the 'Migration' category in the toolbox. These activities can be added to the workflow via drag and drop:
You should use 'Control Flow' activities such as If in order to structure the workflow, so that the appropriate 'Provision' activity is executed for a given SourceItem. Activity properties can be set by selecting the activity in the designer and using the properties pane:
Each activity has different properties. For example, ProvisionFile requires a ContentType value which is used to retrieve and set the SharePoint Content Type for the file. This defaults to 'Document' but can also be set via an expression, which is useful when a SourceItem attribute should determine the ContentType:
For further assistance in creating a custom workflows contact MacroView at Services@macroview.com.au and one of our solution consultants will be able to help you.