Skip navigation
All Places > Getting Started > Blog > 2014 > December
2014

Hello fellow Nintexers.  This is my Happy New Year post and why not bring it in with some humor?

 

If you're like me, and enjoy working with others, then Nintex is one of the best tools to use for organization using SharePoint.  After a fantastic year with several clients, I decided to go back through my projects and help tickets to see what were the top 5 things I saw being done wrong with Nintex.  Its definitely not comprehensive, but it can help shed light on things you should probably avoid if at all possible.

 

So without any further waiting, click on the attachment below.  Each mistake includes a tip to help to prevent it or avoid it if at all possible.

 

Oh and because this is not comprehensive, share things you've seen and maybe we can build an even bigger list for people to avoid in 2015 (yes this is repeated in the presentation for emphasis).

Title

Assign Flexi Task

Assign To do Task

Request Data Action

Request Approval

Request Review

Purpose

Flexi task action allows user to respond with either approve or reject the task but able to create custom outcomes.

Assign To do Task action allows user to respond with either approve or reject the task.

The request data action is used to retrieve some information from the user based on the content type configured within the action.

Request Approval action allows the user to respond with either approve or reject.

The request review action is similar to the approval action but the user does not have to enter an outcome, just review the item and then select continue.

Creates Multiple Tasks?

Yes

Yes

No

Yes

Yes

Content Type

No

Choose to use an existing, or instruct Nintex Workflow to create a new content type.
Note:
The ‘Nintex Workflow Task’ content type is reserved for request approval and request review actions.

Choose to use an existing, or instruct Nintex Workflow to create a new content Type.

No

No

Reviewer Response

5 Options
•First response applies
•All must agree
•Majority decides
•Majority must choose a specific outcome
•All must agree on a specific outcome

2 Options
•All must review
•First response applies

No

4 Options
•All must approve
•First response applies
•Only one approval is required
•Vote

2 Options
•All must review
•First response applies

Enables you to Customize the task form?

Yes

No

Yes

Yes

No

Task Notification

Yes
(Multiple User or group)

Yes
(Multiple User or group)

Yes
(single user or group)
Note: If it is assigned to a group, the first group member to respond will act on behalf of the entire group.

Yes
(Multiple User or group)

Yes
(Multiple User or group)

Not Notification Required

Sent when the user no longer needs to respond to the task. This can occur when:
•A task is assigned to multiple users but only one is required to respond.
•The workflow is terminated prior to the task being processed.
•An error occurs in the workflow at runtime.

Sent when the user no longer needs to respond to the task. This can occur when:
•A task is assigned to multiple users but only one is required to respond.
•The workflow is terminated prior to the task being processed.
•An error occurs in the workflow at runtime.

Sent when the user no longer needs to respond to the task. This can occur when:
•The workflow is terminated prior to the task being processed.
•An error occurs in the workflow at runtime.

Sent when the user no longer needs to respond to the task. This can occur when:
•A task is assigned to multiple users but only one is required to respond.
•The workflow is terminated prior to the task being processed.
•An error occurs in the workflow at runtime.

Sent when the user no longer needs to respond to the task. This can occur when:
•A task is assigned to multiple users but only one is required to respond.
•The workflow is terminated prior to the task being processed.
•An error occurs in the workflow at runtime.

Escalation

Yes
2 Options:
•Delegate task
•Complete task

Yes
2 Options:
•Delegate task
•Complete task

Yes
2 Options:
•Delegate task
•Complete task

No

No

Reminders

Yes

Yes

Yes

No

No

Lazy Approval

Yes (only applicable with email delivery)

No

No

Yes (only applicable with email delivery)

Yes (only applicable with email delivery)

Delegation
Exception:
A site administrator can delegate tasks that are not assigned to them or if delegation is not enabled.

Yes

yes

No

Yes

Yes

set user permissions for the Task

yes

yes

yes

yes

yes

So you're new to the Nintex community, Nintex Connect! To get you up and running, I've compiled some handy tips and tricks for newbies. You'll find more info on the links below. Nintex Connect is here to help you connect with other Nintex users, provide you with a forum to ask your questions, create discussions, help other users out.

 

 

Or watch this overview video!

 

 

Are you new to Nintex products too? The Getting Started space is where it's at! Here you'll find beginner tutorials, information on downloading trials and quite a bit more to start your journey.

 

Anything else you need to know? Leave me a comment below .

sean.fiene@nintex.com

Hide Form Footer

Posted by sean.fiene@nintex.com Support Dec 15, 2014

Products: Nintex Forms 2010, Nintex Forms 2013

Summary

Designer wishes to hide the Form Footer when Nintex Form is in View or Edit Mode.

 

Resolution

Nintex Forms uses the 'nf-form-footer' class:

nf-form-footer.png

The following CSS Class will need to be placed in the Nintex Form Settings > Custom CSS section of the Forms Designer:

 

  1. .nf-form-footer{
  2.         visibility: hidden !important;
  3. }

Products: Nintex Workflow 2013, Nintex Workflow 2010

 

We have often seen the requirement to be able to report on how many Nintex Workflows are in an environment and where they are.

 

Using this PowerShell script you can generate a report of how many workflows are found on each site/subsite/list in a SharePoint environment.

 

Note: This script only targets the Nintex Configuration Database. Update: Script now targets all Nintex databases.

 

Run the below (attached as well as a *.txt file for your convenience) PowerShell script (PowerShell ISE works well) from a SharePoint Server:

PowerShell Script
  1. Add-PSSnapin Microsoft.SharePoint.PowerShell
  2. [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
  3. [void][System.Reflection.Assembly]::LoadWithPartialName("Nintex.Workflow")
  4. #[void][System.Reflection.Assembly]::LoadWithPartialName("Nintex.Workflow.SupportConsole")
  5. [void][System.Reflection.Assembly]::LoadWithPartialName("Nintex.Workflow.Administration")
  6. [void][System.Reflection.Assembly]::LoadWithPartialName("Nintex.Forms.SharePoint.Administration")
  7. $cmd = New-Object -TypeName System.Data.SqlClient.SqlCommand
  8. $cmd.CommandType = [System.Data.CommandType]::Text
  9. $cmd.CommandText = "SELECT
  10.                COUNT (DISTINCT workflowid)as NumberofWorkflows,
  11.                SiteID,
  12.                WebID,
  13.                listid
  14. FROM WorkflowInstance I inner join WorkflowProgress P
  15.                ON I.InstanceID = P.InstanceID
  16. GROUP BY GROUPING SETS((i.siteid, i.webid, i.listid), ());"
  17. $indexes = @()
  18. foreach ($database in [Nintex.Workflow.Administration.ConfigurationDatabase]::GetConfigurationDatabase().ContentDatabases)
  19. {
  20. $reader = $database.ExecuteReader($cmd)
  21. while($reader.Read())
  22. {
  23. $row = New-Object System.Object
  24. if(![string]::IsNullOrEmpty($reader["SiteID"])){
  25. $Site = $(Get-SPSite -identity $reader["SiteID"])
  26. }
  27. if(![string]::IsNullOrEmpty($reader["WebID"])){
  28. $SubSite = $Site.Allwebs[[Guid]"$($reader["WebID"])"]
  29. }
  30. if(![string]::IsNullOrEmpty($reader["ListID"])){
  31. $List = $SubSite.Lists[[Guid]"$($reader["ListID"])"]
  32. }
  33. $row | Add-Member -MemberType NoteProperty -Name "Number Of Workflows" -Value $reader["NumberofWorkflows"]
  34. $row | Add-Member -MemberType NoteProperty -Name "Site Collection" -Value $Site.Url
  35. $row | Add-Member -MemberType NoteProperty -Name "Subsite" -Value $SubSite
  36. $row | Add-Member -MemberType NoteProperty -Name "List" -Value $List.title
  37. $indexes += $row
  38. }
  39. }
  40. $indexes

Once in a while you may end up having orphan Nintex Workflow tasks in your environment. Normally you wont end up in this situation in you production environment as this is normally as result of playing with the workflow or the list.

But anyway we don’t live in a perfect world and things like this happen which can be really annoying. Specially if you are using Nintex Mobile to respond to your tasks. One symptom is that you keep getting the tasks even though you delete local storage.

So here I show you how to delete the orphan tasks for good

  1. Navigate to your SharePoint site.
  2. Choose to edit the page.Nintex Workflow Mobile 1.png
  3. Select insert => Web Part. From the Categories column select Nintex Workflow 2013(or 2010) and from Parts column select My Workflow TasksNintex Workflow Mobile 2.png
  4. Press Add button to add the web part to your page.
  5. Once the web part is added press Save button.
  6. You know must be able to see a list of tasks assigned to you in the web part
  7. The ones which have Remove task link button are orphan tasks and you can delete them by clicking on the link.Nintex Workflow Mobile 3.png
  8. if you don’t see them in the first page, make sure you navigate to all pages and delete them all. Unfortunately the this moment there is no way to delete them all in one go and you need to do this one by one by one.Nintex Workflow Mobile 4.png
  9. Go back to your Nintex Mobile, Delete Local Storage and you should not see the tasks anymore.

Hope this post saves you some headache.

I recently had request from a client to show current items in a list for users to preview as they created a new request.   The actual requirement is listed below.


Requirement:

Allow users to view list items from the current list.  Users should be able to enter the “ID” of the item they want to see in a field on the form, and the form should process and return the fields of the item they specified.


Diagnosis:

I know some people may be thinking about using views, filtering fields and using a query, or perhaps even using a lookup field to achieve the results.  While there are a few different ways to achieve this that I explored, some with extra code, I decided to use a built in function that was native to Nintex that seems to fit the bill quite easily.


Solution:

ehnin1.png

The solution has a few pieces working together and could be greatly complicated depending on your list and form view, but here is what I did to show this functionality:

  1. Current List Form
  2. List View
  3. Labels
  4. Single line of text field (used to capture the ID to filter on)


That’s it.  Seriously, that’s all I added, but it’s connecting them to make the solution work.  I didn’t complicate it because I wanted to focus on the functionality, but there are plenty of additional things that can be done for this to make it nice!  Please note this was configured for Nintex Forms on SharePoint Server 2013 using their trial version. So let’s see how I made this happen.

 

ehnin2.png

The first thing was to make a simple list.  The list in this case was called “TestForm” and contained four fields:

  • Title – default SP title field (Single line of text)
  • Test1 – single line of text field •Test2 – single line of text field
  • Test3 – choice field with drop down options (I used the default ones here for simplicity)

 

After creating the list, I created three test records to have available when I needed to test the form.   So lets get started.  Navigate to the ribbon and access the Nintex Forms button.  Either click on the logo or Customize the Item Form as in the picture below.

ehnin3.png

Once the new form opens in Nintex designer, I started with the basic form and highlighted all the items, then dragged them down to create space for the new fields.

ehnin4.png


From the General section on the left, select the following: Single line of text and set the name to “SetID”.  That’s all you need to do for now.  SetID does not need to be connected to anything since it will temporarily store data we will use for filtering the list view.

ehnin5.png

From the SharePoint section on the left, select the following: List View.  Access the settings and fill in the following information as below, or to match your site information.

ehnin6.png

You will see a warning bar in yellow, alerting you that some additional configuration is needed.  So let’s see if we can get rid of that warning.  See below:

ehnin7.png

  • Source site: / I used the backslash to signify the root site.  You can also click on the green arrow and it will bring up the sites that can be selected.
  • List – this is the list name “TestForm” •View name – type in “All Items” for now.  This takes straight text here so don’t use the “.aspx” name here
  • Filter list items – “by a controls value” (this is where SetID comes to work)
  • Where – “ID”
  • Filtered by Control – “SetID”
  • Resizing – “No”


So if you are following along you can now see that we want to display the list TestForm, where the items ID is equal to the value entered in the SetID field on the form.  I also chose no resizing so the results would not overflow my form but stay within the boundaries I set.


Before going to far, let’s test this to see if it works.  Navigate to Nintex Forms tab in the browser and hit preview.  The reason for using the preview is that it gives you the ability to view your form without saving or publishing it.  Saves you some time in case you don’t like the changes you made.

ehnin8.png

You should see something similar to the screenshot below.  If not, go back and walk through the steps again.

ehnin9.png

While this does not look pretty, let’s enter a value to see if our setup worked.  Hoorah! I hope yours worked.  If not, shoot me a comment.

ehnin10.png

Fine Tuning:

Now that I know it works, I went back and added a few more things to make it look better and give the user a few instructions on how it works.   Here’s what I did:

ehnin11.png

  1. Added a rule to the List View to only show when SetID was not empty or null. “isEmptyorNull(SetID)”
  2. Added a label with bold text set to 11 with the words “Enter ID below
  3. Added another label with the instruction text
  4. Made the list view smaller so that only the title of the columns and the one line would show up.

 

That’s it “Simply #Ninticity”.   You should be able to create a new item, enter the ID if you want to view the other items and proceed.  Know of other things to make this look pretty?  Leave a comment with any questions. Also tweet me your comments @Eharris04.  This post can also be found on Summit 7 Systems website as well if you want to find other post similar to these.

This is a simple example, on how to read an XML value from a workflow variable, InfoPath form, or document library, and upload it to a Document Library.

 

In this example I am going to read a field value from InfoPath From and then upload it to Document library in SharePoint Online.

 

First step is to create a new Workflow, and insert a Query XML action:

1.PNG

Then configure the action, (I just provide some simple inputs)

 

1-1.PNG

 

So far, we have configured the Query XML action to read a XML value, now we need to upload this value using Office 365 Upload File action, then please insert it to the workflow:

 

2.PNG

 

and the configuration is pretty simple as below:

 

2-2.PNG

 

and that's it. now publish the workflow and run it.

 

Thanks, !

To limit the maximum length of input field during typing you have to assign a Control CCS Class to an text box. The class name is a concatenation of string 'kob-maxtextlen-' and a number giving the maximum text length.

After assigning the Control CCS Class and activating the javascript you will find below, a little box is shown during field input on top and on left of the input control counting down the yet available input characters:

 

Javascript code:

NWF$(document).ready(function () {

   NWF$("body").append('<div id="charCounter";></div>');  // create div for counter

   var zaehlerFeld = NWF$('#charCounter');   // save as jquery object

   zaehlerFeld.hide(); // hide the div

   NWF$("[class*=kob-maxtextlen-]").each(function () { // for all html elemts with class name beginning with kob-maxtext-len

      var classes = this.className.split(" ");  // splitt class names

      for (var i = 0; i < classes.length; i++) {  // for all class names of the actual html

         if (classes[i].substr(0, 15) == "kob-maxtextlen-") {   // check if class name begins with kob-maxtext-len

            var maxlen = parseInt(classes[i].split('kob-maxtextlen-')[1]); // extract the number at the end of the class name

            NWF$(this).on('focus input blur', function () { // define an event function

               zaehlerFeld.show();   // show counter

               zaehlerFeld.css({   // format counter

                                 "text-align":"center",

                                 "display":"inline-block",

                                  "background-color":"#FFF",

                                  "border":"1px solid",

                                  "box-shadow":"3px 3px 3px #888",

                                  "height":"16px",

                                  "width":"22px"

                              });

               MaxTextLaenge(NWF$(this), maxlen, zaehlerFeld);  / call check function

            });

            NWF$(this).blur(function () {

               zaehlerFeld.text(' ');

               zaehlerFeld.hide();

            });

         }

      }

   });

 

});

 

function MaxTextLaenge(textFeld, maxAnzahl, zaehlerFeld) {

   zaehlerFeld.position({  // positioning the counter

      my: "left top-16",

      at: "left top",

      of: textFeld,

      collision: "fit"

   });

   if (textFeld.val().length > maxAnzahl) { // more then max characters enterd

      textFeld.val(textFeld.val().substr(0, maxAnzahl)); // limit to max text length

      textFeld.css('border-color', 'red');  // show control border in red

      zaehlerFeld.text(0);   // no more input allowed

   } else {

      zaehlerFeld.text(maxAnzahl - textFeld.val().length); // count down counter

      textFeld.css('border-color', "");   // normal border

   }

}

 

Minimized:

NWF$(document).ready(function(){NWF$("body").append('<div id="charCounter";></div>');var zaehlerFeld=NWF$('#charCounter');zaehlerFeld.hide();NWF$("[class*=kob-maxtextlen-]").each(function(){var classes=this.className.split(" ");for(var i=0;i<classes.length;i++){if(classes[i].substr(0,15)=="kob-maxtextlen-"){var maxlen=parseInt(classes[i].split('kob-maxtextlen-')[1]);NWF$(this).on('focus input blur',function(){zaehlerFeld.show();zaehlerFeld.css({"text-align":"center","display":"inline-block","background-color":"#FFF","border":"1px solid","box-shadow":"3px 3px 3px #888","height":"16px","width":"22px"});MaxTextLaenge(NWF$(this),maxlen,zaehlerFeld)});NWF$(this).blur(function(){zaehlerFeld.text(' ');zaehlerFeld.hide()})}}})});function MaxTextLaenge(textFeld,maxAnzahl,zaehlerFeld){zaehlerFeld.position({my:"left top-16",at:"left top",of:textFeld,collision:"fit"});if(textFeld.val().length>maxAnzahl){textFeld.val(textFeld.val().substr(0,maxAnzahl));textFeld.css('border-color','red');zaehlerFeld.text(0)}else{zaehlerFeld.text(maxAnzahl-textFeld.val().length);textFeld.css('border-color',"")}}

Products: Nintex Workflow 2013, Nintex Workflow 2010

 

We often encounter a situation where the performance of a SharePoint farms workflow infrastructure could be drastically improved if fragmentation on Nintex Workflow databases were minimal. This script will provide a way to review the fragmentation of all table indexes inside of the Nintex Workflow Configuration\Standalone Content database.

 

Run the below (attached as well as a *.txt file for your convenience) PowerShell script (PowerShell ISE works well) from a SharePoint Server:

 

 

PowerShell Script
  1. Add-PSSnapin Microsoft.SharePoint.PowerShell
  2. [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
  3. [void][System.Reflection.Assembly]::LoadWithPartialName("Nintex.Workflow")
  4. [void][System.Reflection.Assembly]::LoadWithPartialName("Nintex.Workflow.Administration")
  5. $cmd = New-Object -TypeName System.Data.SqlClient.SqlCommand
  6. $cmd.CommandType = [System.Data.CommandType]::Text
  7. $cmd.CommandText = "SELECT OBJECT_NAME(i.object_id) AS TableName ,i.name AS TableIndexName ,phystat.avg_fragmentation_in_percent FROM sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, 'DETAILED') phystat inner JOIN sys.indexes i ON i.object_id = phystat.object_id AND i.index_id = phystat.index_id WHERE phystat.avg_fragmentation_in_percent > 10"
  8. $reader = [Nintex.Workflow.Administration.ConfigurationDatabase]::GetConfigurationDatabase().ExecuteReader($cmd)
  9. $indexes = @()
  10. while($reader.Read())
  11. {
  12.     $row = New-Object System.Object
  13.     $row | Add-Member -MemberType NoteProperty -Name "TableName" -Value $reader["TableName"]
  14.     $row | Add-Member -MemberType NoteProperty -Name "TableIndexName" -Value $reader["TableIndexName"]
  15.     $row | Add-Member -MemberType NoteProperty -Name "avg_fragmentation_in_percent" -Value $reader["avg_fragmentation_in_percent"]
  16. $indexes += $row
  17. }
  18. $indexes

 

To use the script do the following:

  • Ensure you are running the PowerShell console as a SharePoint Administrative account.

The first time I worked with attachments in a workflow, I ask where are the attachments stored and how can I show all attachments in the following workflow tasks to give an approver the possibility to read the attachments.

 

I have attached an NINTEX 2013 example site workflow using NINTEX Forms 2013.

 

A prerequisite is the installation of the Get List Item Attachment in Base64 Custom Action from Vadim Tabakman (see http://www.vadimtabakman.com/nintex-workflow-get-list-item-attachment-in-base64-custom-action-happy-thanksgiving.aspx).

 

In the first Flexi Task you can add multiple attachments. The task IDs are stored in the workflow variable task_ids This attachments are stored in the task items of the Flexi Task.

If the Flexi Task is approved an item is created in a data list.

 

To copy the attachments from the task item(s) to the list item the following steps have to be executed in a loop for each task ID:

  1. Call web service Lists.asmx with method GetAttachmentCollection to get the URLs of all task item attachments. The resulting XML is stored in workflow variable attachments_xml
  2. Extract the URLs from XML and store them in a workflow collection variable attachment_coll by Query XML action.
  3. For each attachment URL the following steps are executed:
    1. Get the attachment from task item in base64 format an store it in workflow variable attachment_base64
    2. Get the filename from attachment URL by Regular Expression action
    3. Call web service Lists.asmx with method AddAttachmentCollection to add the attachment to the list item

 

 

Now all task attachment are stored in the list item.

 

To show the attachments formatted  as HTML links in the next Flexi task form the following steps have to be executed:

  1. Call web service Lists.asmx with method GetAttachmentCollection to get the URLs of all list item attachments. The resulting XML is stored in workflow variable attachments_xml
  2. Extract the URLs from XML and store them in a workflow collection variable attachment_coll by Query XML action.
  3. For each attachment URL the following steps are executed:
    1. Get the filename from attachment URL by Regular Expression action
    2. Build the html coding for the links and store it in the workflow variable attachment_html_links

 

Now the html coding for the attachment links is ready to be rendered in the form of the next flexi task.

 

To show the links in the form I used a Rich Text control. My first attempt to enter the worklfow variable by Insert Referenz to the control was unsuccesful - the html coding was shown, not the rendered link. So a little JavaScript was neccessary. First I assigned a unique CCS Class name Anlagen to the control. Second I created a Single Line Textbox control where I inserted by Insert Referenz my workflow variable containing the html coding. The control itself was made invisible on the form by css. By JQuery the html content of the control will be replaced by the content of my workflow variable:

NWF$(document).ready(function () {

    try {

          NWF$('.Anlagen').html(NWF$('#'+ anlagen_html).val());

    } catch (err) {

 

    }});

Now the attachment links will be rendered:

 

I hope it is helpfull for someone!

 

Manfred

Planning ahead

 

When designing a fairly complex workflow/business process it is common for a workflow to become overly complex (in programming this is often referred to as a god object). This can lead to issues down the road such as:

 

  • Troubleshooting/Debugging difficulties.
  • Difficulty maintaining code/loss of flexibility.
  • Performance degradation on publishing (or even timing out altogether).
  • Performance degradation on initialization (this can affect the entire farm).
  • Inability to export or edit the workflow after publishing.
  • Workflow template corruption (limited to the workflow itself).

 

Workflows should be broken up into more manageable bits whenever possible (in computer science this is called Separation of Concerns). An example of this would be a workflow that has multiple stages of approval and logic inside of each approval branch:

 

There are several approaches that can be taken to mitigate these issues:

 

User Defined Actions (UDAs)

 

User defined actions are a great tool for encapsulating a piece of workflow code/logic. Additionally, user defined actions provide a way to design your workflows to interfaces which helps to decouple your logic in a way that makes it easily maintainable and reusable.

 

Sub Routines (Child Workflows)

 

Utilizing the Start Workflow action you can call subroutines (child workflows) to perform some work and report back as soon as they complete. Utilizing multiple workflows instead of one enables you to keep your workflow size down as well as avoiding performance issues that come with large workflows.

 

exampleworkflow.png

 

In the above example, the following could be done to break the workflow into smaller bits that could be independently updated without affecting the rest of the workflow:

 

  • The flexi task in section A could be placed in a separate workflow. The workflow could be called by the Start Workflow action. Inside of the action it can be configured to wait for the subroutine (child workflow) to complete or not.
  • The workflow code/logic in section B could be placed in a UDA (User Defined Action) or another subroutine (child workflow).

 

 

Performance

 

When designing a workflow, keep in mind the following: Smaller is better (and more efficient). While there is no hard limit on how large a workflow can be (the limit is dependent on your SharePoint farm configuration and overall performance), we generally start to see issues when a workflow is around 500Kb or 100 actions (these typically correlate with each other well).

 

To determine how large your workflow is, export the workflow from the Nintex Workflow Designer to an ‘*.nwf’ file. The size (not size on disk) of this file is the value we are looking for.

 

Design Considerations

 

  • Nintex Forms can add a significant amount of size to a workflow file. If you have a workflow utilizing Nintex Forms and the workflow is no where near 100 actions however, it is over 500Kb, it is safe to assume the file size is caused by the form and not the workflow itself.
  • If a workflow utilizes UDA’s, each UDA should be exported and added to the overall file size as they are combined at runtime.

 

More Information

 

Applicable to Versions of Nintex Workflow 3.1.1.0 (Nintex Workflow 2013) and 2.4.1.0 (Nintex Workflow 2010) and earlier.

 

Configuration

 

Nintex Workflow solutions are deployed to SharePoint as Web Application scoped Solutions (Nintex Live being an exception). Nintex Workflow also makes use of the GAC (Global Assembly Cache) for its assemblies. When Nintex Solutions are deployed to the farm, only Web Application Servers install a copy of the Nintex Workflow assemblies into their GAC.

 

Every server that is running the Workflow Timer Service (Microsoft SharePoint Foundation Workflow Timer Service) is going to be in a pool of servers that can/will process Sharepoint and Nintex Workflows. SharePoint uses a round robin system to determine which server will process a given workflow instance. There is no feasible way to limit/reconfigure this functionality other than to turn the Workflow Timer Service off on a given server.

 

It is required that each server that is configured to run workflows (Microsoft SharePoint Foundation Workflow Timer Service) also be configured as a Web Application (Microsoft SharePoint Foundation Web Application Service) server. So that each workflow has access to Nintex Assemblies when needed.

 

services.png

 

Licensing Considerations

In Nintex Workflow 2013, the only Servers that need to be licensed are servers that will render the Nintex Workflow Designer (Typically servers that are in a load balanced pool):

 

Designer.png

 

In Nintex Workflow 2010, each server in the farm running the Workflow Timer Service needs to at least be licensed as an Application Server (No additional cost). Each Server that will render the Nintex Workflow Designer need to be licensed as a Front End Server.

 

More Information

 

Defensive Workflow Design Part 1 - Workflow History Lists

Defensive Workflow Design Part 3 - Separation of Concerns

Defensive Workflow Design Part 4 - Slow Down and Speed Up

Defensive Workflow Design Part 5 - Batching

This post was originally posted on my blog, sopkow.com.

If you've got a Flexi Task and you want to replace the Decision Control with buttons that submit the form and sets an outcome, you can do so with just a little bit of configuration and a touch of JQuery. The following describes how this can be easily accomplished

 

On our Nintex Form, add a Decision Control, we will be using JQuery to hide this field (if you don’t want to use JQuery you can place it behind another control). Note that we can’t set this to Visible: No , because we will need the control rendered into the form.

Next, add ‘Save and Submit’ buttons to your form (one for each outcome). In the advanced section of the control’s properties, set the onclick of the first button to:

NWF$('#'+myDecisionControl+'_0').prop("checked", true);return;

This will submit the task with decision set to the first outcome. For the other buttons that you've added, change the _0 part to the zero-based value of the decision control (if you want the third outcome use _2, if you want the 8th use _7,etc). Note that the “return;” allows the form submission to continue after setting our decision.

To hide the Decision Control from the user’s view, we now want to add our JQuery.

NWF$('#'+myDecisionControl).hide();

It’s as simple as that. Now that’s great, but what if we want to be able to save this item mid-task and complete it later? Well if we just add a save button and hit that, we get a “This is a required field” error. The easiest way to solve this is by setting a ‘default’ on our control. Unfortunately, we’re not able to do this directly on the control, so we’re going to need some more JQuery. Luckily, we've already written it.

NWF$('#'+myDecisionControl+'_0').prop("checked", true);

Will set the value just like our buttons do, and since we’re not submitting the task when we perform a Save action, the decision set on a task mid-task shouldn't matter.*

Those last two lines of JQuery need to be called after the controls are loaded, so by throwing them in a document ready, we get the following:

NWF$('document').ready(function(){ 
    NWF$('#'+myDecisionControl).hide();
    NWF$('#'+myDecisionControl+'_0').prop("checked", true);
});

With that, we’ve successfully interchanged the required Decision Control for some more meaningful buttons.

*It may matter if you’ve got filters on your Workflow Tasks lists to display these to users. Consider adding an addition Workflow Task outcome ‘Pending’ as your first outcome, then simply don’t have a Save and Submit button setting this Decision.

Why do it this way?
Another way to achieve a similar result is to connect the button to the Decision field, the problem with this is that the integer that you want to output as the decision (the IDs of the outcome) might not be consistent across your environments/Site Collections, especially if you are using custom task names throughout your farm. What this means is that for each new environment, you would have to publish the form with a calculated field displaying the ID of the decision you've selected or check the database to ensure the integer is consistent (note that previewing does not work, all values may simply display -1). If the integer is not the same, then you have to have different forms for different environments, which can be cumbersome and difficult to maintain.

Questions? Comments? Recommendations?
Please feel free to leave a remark below.

Sometimes it is necessary to have access to the Nintex Workflow/Forms assemblies (Developing custom actions for example). The files reside in the GAC (Global Assembly Cache). By default, files in this location are not very easy to get to. A quick way to get to the assemblies is to use the subst command. Example: subst g: c:\windows\assembly would attach the GAC folder to a driver letter of g:

howtogac.png

 

Once you have mounted the GAC, you will find the Nintex Assemblies in the GAC_MSIL (Microsoft Intermediate Language) folder as illustrated above.

Filter Blog

By date: By tag: