API support

CSOM SSOM

Can be deployed under

Web

Notes

SharePoint 2013 workflow provision is enabled via SP2013WorkflowDefinition object.

Both CSOM/SSOM object models are supported. Provision checks if object exists looking up it by DisplayName property, then creates a new object. You can deploy either single object or a set of the objects using AddSP2013Workflow() extension method as per following examples

Examples

Add SP2013 workflow

var writeToHistoryLstWorkflow = new SP2013WorkflowDefinition
{
    DisplayName = "M2 - Write to history list",
    Override = true,
    Xaml = WorkflowTemplates.WriteToHistoryListWorkflow
};

var model = SPMeta2Model.NewWebModel(web =>
{
    web.AddSP2013Workflow(writeToHistoryLstWorkflow);
});

DeployModel(model);