Friday, 11 March 2016

Getting Started in the SharePoint Environment


For the purpose of this workflow, a SharePoint list must be created. Ensure that suitable columns are available in the SharePoint list. These are data fields that will be used in the workflow. In this tutorial  will need:
  • Leave Type
  • Start Date
  • End Date
  • Description
For information on how to create the SharePoint list for the leave request workflow please see here.

Once you have your SharePoint list created, we can begin on designing the workflow itself. Open the SharePoint list, where you want to create the workflow on. In the Ribbon, select Workflow Settings, and click on Create a Workflow in Nintex Workflow.
create_NW.png
Select the Blank template and click Create.

Configure an Email Notification


Use a Send Notification action to send an email to the initiator acknowledging receipt of the request.
Select and drag a Send Notification workflow action onto the design canvas. Double-click on the send notification action to open the configuration dialog. In the To field, click the Lookup Icon.
send notification.png
Select the Lookup section and click Initiator. Click Add and OK.
initiator.png
In the Subject field, type "Leave Request".
  1. Select the Insert Reference icon.
  2. In the Item Properties tab, click Leave Type.
  3. In the Common tab, click Initiator's Display Name and then OK.
leave request.png














In the email body text box, type the following message. "Your leave request has been received and forwarded to Manager's Display Name for review". Note: Use the Insert Reference icon to locate the Manager's Display Name value in the Common tab, to compose the message as below.
managers_name.png
Type "Leave Details" into the textbox and then "Type" on the next line. Click on the Insert Reference icon and select the Item Properties tab. Click onLeave Type and then OK.
Press the return button to start on a new line. Repeat to insert Start Date and End Date and compose the message as shown below.
send_notification_email.png
Click on the General tab and then Save.

Configure a Request Approval action to inform the Manager of a Leave Request

Use the Request Approval workflow action to inform the selected user/approver of the leave request.
  1. Click and drag a Request Approval action onto the design canvas below the Send Notification action.
  2. Double-click on the Request Approval action to open the configuration dialog.
  3. In the Approvers field, click the Lookup icon.
  4. Select the Lookup section and click Manager. Click Add and then OK.Note: To enable the automatic selection of a user's manager, the information must be available in the user's Active Directory account. If you are trialing Nintex on a site hosted by Nintex, the user's manager information will not be available as the Standard Edition of Nintex Workflow does not support Active Directory.
  5. In the Ribbon, click Task Notification.
  6. In the Edit settings for field, select Manager.
  7. In the Delivery type field, select Email
  8. In the Subject field, type "Approval Required".
  9. In the email body text box, type the following message "A leave request has been received".
  10. On a new line, type "Staff member" into the textbox. Click on the Insert Reference icon.
  11. In the Common tab, select Initiator's display name and then OK.
  12. Press the return button to start on a new line.
  13. Repeat steps 12-14 to Start DateEnd Date, and compose the message as shown below.
  14. Click on the General tab and click Save

Send an email to notify the initiator their leave request has been denied

The next step is to configure a Send Notification action to inform the initiator of a rejected leave request.

  1. Drag a Send Notification workflow action onto the design canvas on the left-hand side of the Request Approval workflow action.
  2. Open the configuration dialog and in the To field, click the Lookup icon.
  3. Select the Lookup tree and click Initiator, then Add and OK.
  4. In the Subject field, select the Insert Reference icon.
  5. In the Item Properties tab, click Leave Type and then Add.
  6. Type "has been rejected" after the Leave Type value, like the image below.
  7. In the Email body text box, type the following message. "Your leave request for Start Date to the End Date has been rejected".
  8. Note: Use the Insert Reference icon to locate the Start Date and End Date values in the Item Properties tab, to compose the message.

Send an email notification to inform HR of the leave approval

Now we can also add a Send Notification action to inform the HR Manager that leave has been approved for the employee.
  1. Drag a Send Notification action onto the design canvas, on the right-hand side of the Request Approval action.
  2. Open the configuration dialog, and in the To field, select the Lookup icon.
  3. Select External email address and enter the email address the notification is to be sent to. Or, use an internal search for your HR department.
  4. Click Add and then OK.
  5. In the Subject field, type "Leave Request Approved".
  6. In the email body text box, type the following message: “Initiator’s display name has been approved by Manager for Leave type between Start Date and End Date.”
Note: Use the Insert Reference icon to locate the Initiator’s display name, Manager, Leave type, Start Date and End Date values in the Item Properties tab. 

Send an email to inform the initiator their leave request has been approved

Instead of configuring the Send Notification action from scratch, we can copy the Send Notification action on the left-hand side of the Request Approval branch, to the right-hand side and then update the action as required to inform the initiator their leave request has been approved. 

  1. Click on the drop down arrow of the Send Notification action and select Copy. Below the Inform HR workflow action, right-click on the drop zone and select Paste
  2. Open the configuration dialog and in the Subject field, change "has been rejected" to “accepted”.
  3. In the email body text box, change the message to read, “Your leave request for Start Date to the End Date has been accepted.”
  4. Click Save. 

Save and publish the Workflow

  1. In the Nintex Workflow Ribbon, click Save.
  2. In the Title field, type “Leave Request”.
  3. In the Description field, type “Use this workflow to process leave requests”.
  4. Click Submit.
  5. In the Nintex Workflow Ribbon, click Publish and Submit.

The workflow is now ready to use.

Click for Starting Part1