BrightWork Tip: Create a Project with Nintex Workflow and BrightWork Web Service
The BrightWork web service is now extended to include the new endpoint, Create Project so that you can use Nintex Workflow to provision new Project Sites.
This allows the user to create projects based on parameters passed in by the user (using JSON) and this service will be called from the parent web.
- Will create a new top-level project in BWSite.
- Will create a new subproject under Project A.
The Nintex workflow can be used with the existing Project Request Manager Template but ensure you disable the native BrightWork feature to create a Project from a Request. The workflow could also be employed in a standard SharePoint Custom List. This blog will step through the process of building the Nintex Workflow.
Create Project Nintex Workflow
Step 1 – Define your Variables
The Nintex Workflow needs seven variables defined, three of which are needed for the Web Service Call and four that are needed to create the Project:
|PostResult||Single line of text|
|PostResultMultipleText||Multiple lines of text|
|XMLExtract||Single line of text|
|ProjectName||Single line of text|
|TemplateName||Single line of text|
|ProjectDescription||Multiple lines of text|
|ProjectManager||Person or Group|
Step 2 – Set your Variables
In Nintex, use the standard Set Variable Action to capture information from the Project Request Form that will be passed to the Project Site.
Step 3 – Build and execute the Web request
Building and executing the Web request requires three actions:
Step 3a – Capture XML containing X-RequestDigest
Create a Web Request Action to capture the X-RequestDigest and store the information in the PostResultMultipleText variable
Step 3b – Extract X-RequestDigest from XML
Create a Query XML Action to parse out the X-RequestValue from the XML captured in the previous action and store the information in the XMLExtract Variable.
XML from Variable:
Output using Xpath:
Step 3c – Create Project Site from X-RequestValue
The final step is to create the Project Site using the X-Request Digest and populating the Project with your pre-defined variables:
Our recorded webinar showcases how BrightWork and Nintex automation partnership can help with your project and portfolio management.