Event Driven Workflows - Nintex Workflow for Project Server 2013

Document created by emily.billing@nintex.com Champion on May 18, 2014
Version 1Show Document
  • View in full screen mode

Event driven workflows provide the ability to associate Nintex workflows with Microsoft Project Server events. Nintex workflows can be started based on events that happen within Project Server.


This tutorial will describe how to retrieve the enterprise resources that have a Booking Type of Proposed, which have been added as a resource to the project plan every time it is published.


After completion of this tutorial, you will know how to create an event driven workflow, use the Retrieve event data action within the workflow, and associate the workflow to a Microsoft Project Server event.This tutorial assumes the user has basic knowledge of designing workflows in Project Server using Nintex Workflow for Project Server 2013.

 

Getting Started

Open Nintex Workflow for Project Server 2013 workflow designer and create a new event driven workflow.

  1. Navigate to the Project Web App (PWA) site.
  2. Click on the Settings icon > Nintex Workflow for Project Server > Manage Event Driven Workflows.
    event_driven_workflows.png
  3. In the Manage Event Driven Workflows Ribbon, click the New button to open the workflow designer.
  4. In the Nintex Workflow 2013 Ribbon, click on the Workflow Settings button. In the Title, type “Get Proposed Enterprise Resources”.
  5. In the  Description, type “This workflow will retrieve a list of enterprise resources with a booking type of proposed from the project plan”.
  6. Click Save when completed.

workflow_settings2.png

 

Designing the Check Baseline Workflow

The event driven workflow will be associated with the Project Published event. In order to identify which project was published, the Retrieve event data action will be added to the workflow to provide that information.

  1. Navigate to the Workflow Actions toolbox and click the Project Server category to display the workflow actions specific to Project Server.
  2. Drag and drop a Retrieve event data action onto the design canvas.
  3. In the Retrieve event data drop-down menu, click Configure.
    • In the Event field, select Project; Published and Property.
    • In the Data to retrieve field, select ProjectGuid and click Add.

retrieve_event_data.png

Create a workflow variable to store the ProjectGuid.

  1. In the Retrieve event data Ribbon, select Variables.
  2. In the Workflow Variables dialog box, click New.
    1. In the Name box, enter “ProjectGUID”. 
    2. In the Type field, select Single line of text. Click Save and Close.
  3. In the ProjectGuid (Guid) field, select the workflow variable ProjectGUID. Click Save.

projectGUID.png


The next section describes the steps required to query the published project plan to retrieve list enterprise resources with a booking type of proposed.

  1. Drag and drop a Query Project Server action onto the design canvas.
  2. Configure the following settings:
    1. In the Project server connection field, select Configure new connection.
    2. Specify the connection details to your Project Web App (PWA) site in the Project Server connection fields. Click on Verify connection.
      Note: For more information on the Project Server connection and how to create a new Project Server connection to a PWA site, refer to the Help Files included in the product.
    3. In the Method field, select Project; ReadProject.
    4. In the projectUid (Guid) field, select the Insert reference function. In the Workflow Variables tab, locate the ProjectGUID variable. Click OK.
    5. In the dataStore (DataStoreEnum enum) field, select PublishedStore.
    6. In the Table field, select ProjectResource.

query_project_server.png

  1. In the Filter section, click on Add column to filter.
  2. Configure the following settings:
    1. In the Where the column field, select RES_BOOKING_TYPE and Equals.
    2. In the third Where the column box, type “1”.
    3. Click on Add column to filter.
    4. column_to_filter.png
    5. Select And in the drop-down menu.
    6. In the Where the column field, select RES_IS ENTERPRISE_RESOURCE and Equals.
    7. In the third Where the column box, type “True”.

where_the_column.png

Create a workflow variable to store the list of resources that match the query configured above.

  1. Select Variables in the Query Project Server Ribbon and select New.
    1. In the Name box, type “ProjectResourcesGUID”.
    2. In the Type field, select Collection. Click Save and Close. 
  2. In the Select column field, select RES_UID and click Add.
  3. In the RES_UID field, select the ProjectResourcesGUID  variable to store the list of resources that are returned by the query.
  4. Click Save.

variable_query_PS.png

Next, retrieve and log the display name for each resource GUID that is in the ProjectResourcesGUID collection workflow variable in the workflow history list.


Create a workflow variable to store the individual Resource GUID of each resource from the ProjectResourcesGUID collection variable.

 

  1. In the Nintex Workflow 2013 Ribbon, select the Workflow Settings drop-down menu and click on Variables. 
  2. In the Workflow Variables dialog box, click New.
    1. In the Name box, type “ResourceGUID”.
    2. In the Type field, select Single line of text. Click Save and Close. 
  3. Drag and drop a For each action onto the design canvas.
    for_each.png
  4. Configure the following settings:
    1. In the Target collection field, select ProjectResourcesGUID.
    2. In the Store result in field, select ResourcesGUID.
    3. Click Save.
      for_each_config.png
  5. Drag and drop a Query Project Server action within the For each action that was just configured.
  6. Configure the following settings:
    1. In the Project Server Connection field, select Configure new connection
    2. Specify the connection details to your Project Web App (PWA) site in the Project Server connection fields. Click on Verify connection. Note: For more information on the Project Server connection, refer to the Help Files included in the product.
    3. In the Method field, select Resource; ReadResource.
    4. In the resourceUid (Guid), select the Insert reference icon. In the Workflow Variables tab, locate the ResourcesGUID variable. Click OK.
    5. In the Table field, select Resources.

query_project_server2.png


Create a workflow variable to be used for storing the resource name of the query configured above.

  1. In the Query Project Server Ribbon, select Variables.
  2. In the Workflow Variables dialog box, click New. Type “ResourceName” as the name, and select Single line of text. Save and close.
  3. In the Select column, select RES_NAME and click Add.
  4. In the RES_NAME field, select the ResourceName variable. This will store the name of the resource that is returned by the query. Click Save.

resources.png


The next step is to log the Resource Name in the workflow history list.

  1. Drag and drop a Log in history list action within the For each action below the Query Project Server action.
  2. Configure the following settings:
    1. Click the Insert Reference icon.
    2. In the Workflow Variables tab, locate the ResourceName variable. Click OK and Save.

log_in_history.png

Publish the Workflow

The capabilities available will depend on the version of Nintex Workflow 2013 which is installed and licensed on the farm.

  1. In the Nintex Workflow 2013 Ribbon, click Publish.
  2. In the Set Title & Description dialog, click Submit and then OK.
  3. In the Nintex Workflow 2013 Ribbon, click Close.

Associating the Event Driven Workflow with a Microsoft Project Server Event

 

The event driven workflow created in the section above must now be associated to the Project-Published event so that the workflow is automatically started when a Project-Published event occurs in Microsoft Project Server.

  1. Navigate to  the Project Web App (PWA) site.
  2. Select the Settings icon > Nintex Workflow for Project Server > Manage Event Driven Workflows.
  3. In the Manage Event Driven Workflows Ribbon, click Create.
    associate_workflow.png
  4. In the Associate a workflow to an event dialog, configure the following settings:
    1. In the Event field, select Project; Published.
    2. In the Workflow field, select Get Proposed Enterprise Resources.
    3. In the Description field, type “Get proposed enterprise resources in the project plan”. Click Save when completed.

 

Run the workflow:

  1. Create a project plan and build the team for the project using enterprise resources.
  2. Ensure that the resources’ Booking Type is set to Proposed.
  3. Publish the project plan to Microsoft Project Server. (Note: The workflow will start when the publish job for this project has been completed.)
  4. Open the Workflow History of the event driven workflow association:
    1. Navigate to the Project Web App (PWA) site. Click on the Settings icon > Nintex workflow forProject Server > Manage Event Driven Workflows.
    2. In the Project section, select the Get Proposed Enterprise Resources event from the list.
    3. In the Manage Event Driven Workflows Ribbon, select Workflow History.
  5. In the CompletedWorkflows section, click the link of the workflow that was most recently completed.
  6. In the Workflow Information box, select Click here to show detailed view.
    workflow_history.png
  7. The list of the proposed enterprise resources will be displayed in the Workflow Messages section.

Attachments

    Outcomes