SP.WorkflowServices.WorkflowDeploymentService.packageDefinition Method (sp.workflowservices)
Packages a single workflow definition into a SharePoint solution package (.wsp file) and saves the package to the Site Assets library.
Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013
SP.WorkflowServices.WorkflowDeploymentService.packageDefinition(definitionId, packageDefaultFilename, packageTitle, packageDescription)
Return value
Returns the URL of the package file in the Site Asset library.
Parameters
definitionId
The guid identifier of the workflow definition.packageDefaultFilename
The default filename to choose for the new package.packageTitle
The title of the package.packageDescription
The description of the package.
Remarks
This method does not activate the package. If a package with the same name already exists in the Site Assets library, the method adds an integer suffix in braces to the file name. For example, a package with the filename packageDefaultFilename.wsp would have a duplicate filename altered to be packageDefaultFilename{2}.wsp and so forth.