Datapolis Process System SDK


Home > WBAdministration



WBAdministration is an interface in Datapolis Process System which contains below methods.


  • Creating Workflows
 CreateListWorkflow(string workflowName, string description, string list, Guid solutionId)
 CreateSiteWorkflow(string workflowName, string description, Guid solutionId)
 CreateReusableWorkflow(string workflowName, string description, string contentTypeId, Guid solutionId)
 CreateGlobalReusableWorkflow(string workflowName, string description, string contentTypeId, Guid solutionId)
  • Match and Deploying Workflows
 MatchXaml(String workflowName, String xaml)
 DeployWorkflow(String workflowName)



In this section you will find examples how to use this interface in PowerShell.

Just like in WBInterface, you can use two different methods of consuming the interface.


Setting Variables

There are a few variables which should be declared before moving on, as they are required by functions in both methods. They are:

  • web uri - uri of web containing a workflow which you want to update
  • workflow name - name of workflow which you want to update with your workflow definition
  • xaml - file with a workflow definition which will be uploaded in place of the old one

This values can be typed inline


$workflowname = "SomeWorkflow"
$xaml = [IO.File]::ReadAllText('C:\Users\Alf\Desktop\workflow_definition.xaml')



Object Model

If you want to run the script on the same farm that Datapolis is installed then Object Model is preferred approach.


First you need to load SharePoint module in PowerShell. Run this command only if you are using regular PowerShell (not SharePoint Management Shell)

Add-PSSnapin Microsoft.Sharepoint.Powershell


Then Load Datapolis Process System dll files





Get demanded SPWeb (this one where matching / deploying will be performed)


$web = Get-SPWeb $uri


Get Datapolis Process System Administration Manager. Pass SPWeb as parameter.


$manager = New-Object Datapolis.WorkBox.Common.WBInterface.WBAdministrationManager($web)


This variable will store result of an operation. WBResultInfo. Result tells whether operation succeeded, WBResultInfo.Message contains communicates about method execution.


$result = New-Object Datapolis.WorkBox.Utilities.WBInterface.WBResultInfo


Match workflow xaml file. If matching was done without errors, xaml file of workflow will be replaced with given one


$result = $manager.MatchXaml($workflowname, $xaml)


Deploy workflow definition (association)


$result = $manager.DeployWorkflow($workflowname)


Web Service


The Service is accessible the same way as WBInterface. It can be found under the following url: http://[WebUrl]/_layouts/15/Datapolis.WorkBox/WBAdministration.asmx


So first change a little previous code:


Create a service object. Command below uses default credentials (logged windows user account)

$service = New-WebServiceProxy -Uri $uri -UseDefaultCredential


Add calling Web Methods

$result = $service.MatchXaml($workflowname, $xaml)
$result = $service.DeployWorkflow($workflowname)