Tag Archive for Workflow

User Defined Actions in Nintex Workflow for Sharepoint

In my last blog post I gave a quick introduction to Nintex Workflow for SharePoint and showed you how to create a very basic workflow with a custom Start Form. I based the fields that are being collected in the Start Form around the idea of a kind of approval workflow that would have 3 types of Approvals that I named Content Approval, Format Approval and Grammar Approval. These approval types could be anything, the idea is just to show that you may have approvals/tasks that are very similar but you would like a few minor differences like with the wording of the Task Description. In order to accomplish this without recreating or copying the same set of Actions multiple times I am going to show you how to create a User Defined Action. A User Defined Action is created in a very similar way to the workflow itself but it allows you to use that set of Actions multiple times in your workflow, or in multiple workflows for that matter, as if it was one action. One of the big advantages to doing this is that if later you need to make a change to that part of the workflow, you can just change the User Defined Action so you don’t have to make the change multiple times.

Now that you get the idea let’s get started. Click on Site Actions. Select Nintex Workflow 2010 and then select Manage User Defined Actions.

Click Create. You will notice that the screen looks the same as when we created the workflow in the previous post.

Go into UDA Settings from the ribbon and enter a Title and Description and optionally change the Category. Click Parameters.

Click New. Enter “ProjectManager” for Name, “Input” for Direction, “Text” as the Type, enter a Description if you want and select Required. Even though you are passing in a person it will accept it as text. Click OK. Click New and create an Input Parameter for “ApprovalText”, “ApprovalType” and “Approver” all with Type of Text. When you are done the User Defined Action Parameter screen should look like this.

Click Close. Click Save on the User Defined Action Settings Screen. Now we are ready to start building the User Defined Action. The process for this is the same as building a workflow. You either select an Action from the left and drag it to the spot you want it or right-click on the spot you want an Action, select Insert Action and select the Action you want. You can then configure the action if necessary.
The first Action we will add will be for a task. There are a few different Actions I could use for this but I am going to use the Flexi task because just like it sounds, it’s a bit more flexible. Right click on the open spot in the Custom Action screen, hover over Insert Action, hover over User interaction and select Assign Flexi task.

Just like in the Workflow you will notice that the Action has an exclamation point indicating it needs to be configured. You will also notice that it has created 2 braches, Approve and Reject. With a Flexi task this can be customized to have different labels and even to add additional outcomes.

Click on the drop down arrow on the Action and select Configure. In the Configure Action screen you can specify who to assign the task to, enter a description of the task, customize the outcomes, etc. You can also customize the task notification that gets sent to the assignee.

To start with we will specify the Assignee by clicking the lookup icon next to the Assignees field. At the bottom of the Select People and Groups dialog expand the “Lookup” section and then scroll down to the Workflow Variables group and click on Approver, click Add and then OK.

This will cause the task to be assigned to the Approver that we setup previously as an input parameter into the User Defined Action. Now we can enter a Task Description. Since we also created an input parameter for Approval Text we will select that for the Description by clicking the Insert Reference button, selecting the Parameters tab, double-clicking ApprovalText and clicking OK. At this point let’s add an additional Outcome. Click Add outcome. Enter “Request Changes” for the name and click OK.

For behavior I am going to just leave it as “First response applies”. The Behavior selection is designed for instances where there are multiple assignees. You can decide if the Outcome is decided by the First response, Majority, or All assignees agreeing. For the purposes of this I am not storing the outcome or outcome achieved. Let’s change the Task Name though. If you remember we created an input parameter of Approval Type. Let’s set the Task name by clearing the default text and then clicking the lookup button next to the field. Click into the “Dynamic text to insert” area at the bottom and type “Review ” (leaving a space at the end). Select the Parameters tab and double-click on ApprovalType and click OK.

I am leaving the rest of the options at their default values so your “Configure Actions” dialog should now look like this.

Now we can customize the notification by clicking the “Task Notification” button in the ribbon. Add the Project Manager to the CC field by click the lookup button next to that field, expanding the Lookup section, scrolling to the Workflow Variables group and adding ProjectManager. Now we can set the Subject to the same value as the Task Name by clearing the default text, clicking the lookup icon, typing “Review ” in the “Dynamic text to insert” area, selecting the Parameters tab, double-clicking ApprovalType and clicking OK just like we did previously. We can now also add the ApprovalText into the notification text. Click on the end of the first line and hit “Enter” twice to add a couple extra line. Put your cursor on the second line and click the “Insert Reference” button. Click on the Parameters tab and double-click ApprovalText and click OK. Your Task Notification should now look like this.

Click on the General tab at the top and click Save. Notice the exclamation point is gone in the Action. Also notice that there is a third branch called “Request Changes”. We are not going to do anything with that branch now but it will be used in another blog post when I discuss looping. Right now all I am going to add is some logging in the Reject and Approve branches. Add the “Log in history list Action” from the Operations group into the “Reject” branch. Click the drop down and select Configure. Click Insert Reference. Go to the “Parameters” tab and double-click ApprovalType. In the Dynamic text to insert box add ” Rejected – ” after the text that was added. Then click the “Common” tab and double-click Approver Comments. Click OK.

Click Save.

Since the only difference between what I want to log for an Approve and a Reject is one word let’s copy by clicking on the drop down icon for the new Log in history list Action under Reject and selecting “Copy”.
Right click on the open space in the Approve branch and select “Paste”. Then Configure the “Log in history list” Action in the Approve branch and change the word Rejected to Approved. Click Save.

We now have a complete User Defined Action so click Publish in the ribbon, add any Change Comments you would like and click Submit. Click Close in the ribbon.
To summarize, in this post we learned how to create a User Defined Action, add and configure the Flexi task Action, customize the notification and add outcomes. In my next blog post I will show you how to add the User Defined Action to the workflow and how to run Actions in parallel.

Introduction to Nintex Workflow for SharePoint

One of the most powerful features in SharePoint that doesn’t get used nearly as often as it should is workflow. One of the reasons for this is that many people are just intimidate by it. They might use some “Out-of-the-Box” approval workflows but beyond that the idea of creating a custom workflow is seen as beyond their capabilities. This is why we have partnered with Nintex. They have a workflow product that integrates seamlessly into the SharePoint user interface so it does not require using Visual Studio or SharePoint Designer. Nintex Workflow provides an intuitive visual interface that makes creating and maintaining workflows much easier.

Over the course of the next few weeks I will be writing a series of articles going through a number of common features that every business can benefit from. The workflow I am going to create during this series of articles is just a simplified example of something you might run into. I am going to have the workflow manually started so it can have a start form to collect data. The workflow is going to assign tasks to 3 different types of approvers in parallel. The approval process will be the same for each but the notifications that will go out to each group will be a little different. This will allow me to show you creating a parallel process and create a user defined action. Additionally I will show how to loop back in case the Project Manager wants to resubmit a Declined tasks to the approver.

For this article I will start from the beginning and show how to customize the workflow start itself by creating variables and customizing the start form.

Let’s get started from the beginning. You will want to start in a list or library, in my case I am starting out in a document library. So we will go to Workflow Settings and select “Create a Workflow in Nintex Workflow”.

When prompted I selected a Blank Template for my workflow. At this point you will see a screen that is similar to flow chart in Visio. The Actions are on the left and the flow chart is in the main part of the screen. At this point I am not going to add any actions I will do that later. In the ribbon click Workflow Settings.

In the Workflow Setting screen, enter a Title for your workflow, a Description of the purpose of the workflow and select the workflow options that you require, in this case I have select Start Manually, and set Start when items are created and Start when items are modified to “No” so that I can have a custom start form.


Now we can add some variables to be populated on the start screen. In the ribbon click “Variables”.


I am going to create a few person selector fields, 3 Approvers and a Project Manager. In the Workflow Variable screen click New and then give the field a Name, select “Person or Group” for the Type, Select “Show on start form”, Select “Required”, and I am choosing “Any User” and “Allow Users” but you can set these however you want.


After doing this for all 3 Approvers and a Project Manager and adding an Approval Text field (Single Line of Text) your Workflow Variable screen should look like this.


At this point, you can Close the Workflow Variables screen. We are now going to customize the Start Form so click the drop down arrow on the Edit Start Form button in the ribbon and select Edit with Nintex Forms.


This will bring up the Nintex Forms – Form Designer. From here you can make whatever changes you would like to the Start Form. For now I just changes some label and made a few other minor changes.


Click Save and then Click Close. Click Save in the Workflow Setting screen. Now we will add just a simple logging action so we can publish our workflow and test the new Start Form.

Log in History List is located in the Operations Group so either open that group and on the left and drag the Log in History List action to the open square in the workflow or right-click on the square and select the action from there.

Notice the exclamation point in the Log in history list item once you have placed it in your workflow. This indicates that you need to do some configuration on that action. Click on the drop down arrow on the action and select Configure.

You can enter any text you want in the text box and insert variables and meta-data values from the associated list item. In this case I just want to log who the Project Manager is. I type the text “The Project Manager for this is: ” and then click the Insert Reference button. Notice the tabs at the top that give you several different options for the source of the information to insert. Click the Workflow Variables tab and then select ProjectManager and click OK.


Click Save and you should now see that the exclamation point has gone away. Now we have a very simple workflow that we can publish. Click the Publish button in the ribbon, enter any Change Comments and click Submit. After the workflow has published you can click the Close button in the ribbon to exit Nintex Workflow. If you now go back into the list/library in which you created the workflow and add an item or upload a file we can test the workflow. Click the drop down arrow on the file name and select Workflows.


Click on the workflow you just created.


You should see the Start screen that you created. Select users for the 3 Approvers and the Project Manager and add some Approval Text and click Start. You can then go into the Workflow Information screen by clicking the drop down arrow next to the file name, selecting Workflows and then Clicking on your workflow in the bottom section “Completed Workflows”.


You should now see in the workflow history section and event with a description that tells you who you selected as a Project Manager.


Just to recap, in this blog post I showed you how to create a Nintex Workflow, Set some basic properties, Add Variables, Edit the Start Form, Add and Configure a basic Action, Publish and run you workflow. In my next blog posts I will continue to build upon this workflow in order to demonstrate some more advanced functionality of Nintex Workflow.