Skip navigation
All Places > Getting Started > Blog > 2016 > May
2016

These steps provide an alternate method to share a Collection variable across multiple workflows, should the Store/Retrieve method not suit. In this example I have 2 list workflows where Workflow1 creates the Collection variable and Workflow2 continues to use the Collection variable.

 

 

 

STEP 1: In Workflow1 use an Update Item action to copy the Collection variable called varCOLString to a Multi-Line Text column called tString.

 

1.PNG

 

Example: Based on our collection variable the text in our tString column might look like this: 1;2;3;4;5;6;7;8;9;

 

 

STEP 2: In Workflow2 use a Set Variable action to copy the tString column to a Multi-Line Text variable called varMLTString.

 

2.PNG

 

 

STEP 3: Use a Build String action to count the number of characters in varMLTString and store this in a Text variable called varTXTLastChar.

 

3.PNG

 

Text: fn-Length({WorkflowVariable:varMLTString})

 

 

Example: Based on the string 1;2;3;4;5;6;7;8;9; the result in varTXTLastChar will be 18.

 

 

 

STEP 4: Use a Math Operation action to subtract 1 from varTXTLastChar and store this in a Number variable called varNUMCount.

 

4.PNG

 

 

Example: Now the value we carry into varNUMCount is 17.

 

 

 

STEP 5: Use another Build String action to remove the last character from the varMLTString variable using the Remove inline function and varNUMCount as a reference.

 

5.PNG

 

Text: fn-Remove({WorkflowVariable:varMLTString}, {WorkflowVariable:varNUMCount}, 1)

 

 

Example: We've removed one from the character count because the Remove inline function starts at zero. The varMLTString variable now looks like this 1;2;3;4;5;6;7;8;9 (we have removed the trailing ";").

 

 

 

STEP 6: Finally use a Regular Expression action and the Split function to output the values of varMLTString into a new Collection variable called varCOLString.

 

6.PNG

 

 

Example: The string 1;2;3;4;5;6;7;8;9 will be split by the ";" character and each value will be added to the new collection.
paul.crawford

Collection Operations

Posted by paul.crawford Champion May 26, 2016

After creating this blog post Collection Operation - Get , i thought it would be good to look at the other Collection Operations in some detail too.

As stated in the article above, the Collection Operation action allows you to interact with a Collection Variable. This can be useful in many situations.

 

Add

This method allows you to add to a value at a specific index within a collection

Original Collection - Audi; BMW; Volkswagen

Value to add - Mercedes

Index - 2

Resulting Collection - Audi; BMW; Mercedes, Volkswagen

 

Remove

This method allows you to remove a value from a specific index within a collection

Original Collection - Audi; BMW; Volkswagen

Value to Remove - BMW

Index - 1

Resulting Collection - Audi; Volkswagen

 

Count

This method allows you to count the number of items in a collection

Original Collection - Audi; BMW; Volkswagen

Result - 3

 

Get

This method allows you to get a value from a specific index within a collection

Original Collection - Audi; BMW; Volkswagen

Index - 1

Result - BMW

 

Exists

This method returns the index of a value within a collection if the value is in the collection, returns null if the value doesn't exist

Original Collection - Audi; BMW; Volkswagen

Value - Audi

Result - 0

Original Collection - Audi; BMW; Volkswagen

Value - Mercedes

Result -

 

Sort

This method sorts the items in a collection

Original Collection - Audi; BMW; Volkswagen

Order - Ascending

Result - Audi; BMW; Volkswagen

Order - Descending

Result - Volkswagen; BMW; Audi

 

Pop

This method returns the last value in a collection

Original Collection - Audi; BMW; Volkswagen

Result - Volkswagen

Resulting Collection - Audi; BMW

 

Join

This method joins all the values in a collection with a specified delimiter and stores in a variable (not a collection variable)

Original Collection - Audi; BMW; Volkswagen

Delimiter - ,

Result - Audi, BMW, Volkswagen

 

Clear

This method clears all items in a collection

Original Collection - Audi; BMW; Volkswagen

Result -

 

Remove Duplicates

This method allows you to remove duplicate items in a collection

Original Collection - Audi; BMW; BMW; Volkswagen

Resulting Collection - Audi; BMW; Volkswagen

 

Remove by Value

This method allows you to remove items from a collection if the value exists. If the value doesn't exist the original collection is returned

Original Collection - Audi; BMW; Volkswagen

Value - BMW

Resulting Collection - Audi; Volkswagen

Original Collection - Audi; BMW; Volkswagen

Value - Mercedes

Resulting Collection - Audi; BMW; Volkswagen

 

Have fun with collections!!!

I was asked this question by Daniel Mueller and thought it was worth sharing

 

I have a string stored in a variable looking like this: name, email, username

I'm using the regular expression to split the string and storing the result in a collection variable (lets name it collection).

So from my understanding it should look like this now:

collection[0] = name

collection[1] = email

collection[2] = username

 

So I only want to use the second variable (email) in that collection and put it into an email field for example how do I do that?

From my understanding there must be something like this: ID1 collection but I dont know how to extract that.

 

Isn't the collection an array of variables?

 

I read the whole guide of "how to use a collection" but this didnt answer my question.

 

The Collection Operation action allows you to interact with a Collection Variable and specifically the Get operation allows you to access a specific index of that collection. In Daniel Mueller case the second index.

 

If the second index of your array is always the email, create a number variable with a default value of 1.

Capture.PNG

Then add a collection operation configured as below

Capture.PNG

This will then store the email address in the vTextEmail variable and you can now use this as you need.

 

All that would need to change would be the value set in the first vNumIndex variable to get the index of the collection required.

 

This document was generated from the following discussion: Collection variable get specific item

This question has been raised many times in the forum and I was eager to find a solution with NF.

How can you allow the users to submit only once.

I had this working in the InfoPath but did not get any success on Nintex Form (probably messing up a very basic lookup).

Here are the steps to create a form which can be submitted only once by the users.

1. Create a list and add an additional column:

     a. UserName - single line text.

2. Edit the form with Nintex.

3. Add 2 panels on the form. In the first panel add the form fields that you want the user to enter. In the second Panel add the text - "You have already submitted the form once" - bold.

4. Change the configuration of UserName field as below:

     Capture1.JPG

This way you are saving the value of the current user in the uppercase. You can hide this field in the form is you want.

5. Add a calculated value control (I called it GetName). Enter the formula as shown below:

     lookup("<ListName>","UserName",toUpper(Current User),"UserName")

     Capture2.JPG

     This will lookup the list where you are creating the form. Find if the UserName column has the same value as current User (in uppercase). It will return the value from that column.

6. Lets add rules to the panels now. Add rule to the first panel where all the fields are: greaterThan(length(GetName),0) > Hide. (SO if the lookup returns the value that means you have submitted an item already).

7. Add another rule to second panel where you have the text: lessThanOrEqual(GetName,0) > Hide. (If lookup returns blank, you have not submitted the item).

 

Save and Publish.

Now when you create item, you should see the form with the fields and would be able to save it. Second time, it should show the panel with the text in bold: "You have already submitted the form once".

 

Hope it works for you.

Since this behavior continues to be a hot issue I have explained this behavior further.

 

As it was mentioned previously in the thread ("You are not authorized to respond to this task." message ), in order to view tasks assigned to other users, a user must have at least "Manage Hierarchy" permission levels at the site level which is *technically* correct as that permission level includes permissions applied when "Full Control" is given to a user. To be more specific I have provided the exact permission levels needed to access a Flexi-task not assigned to you.

 

Here are the exact minimum permission level requirements at the site level to view tasks assigned to users other than you:

(This assumes you already have the required "Edit permissions" aka contribute)

 

List Permissions:

View Items  -  View items in lists and documents in document libraries.

Open Items  -  View the source of documents with server-side file handlers.

View Versions  -  View past versions of a list item or document.

Site Permissions:

Manage Permissions  -  Create and change permission levels on the Web site and assign permissions to users and groups.

Manage Web Site  -  Grants the ability to perform all administration tasks for the Web site as well as manage content.

Add and Customize Pages  -  Add, change, or delete HTML pages or Web Part Pages, and edit the Web site using a Microsoft SharePoint Foundation - compatible editor.

Browse Directories  -  Enumerate files and folders in a Web site using SharePoint Designer and Web DAV interfaces.

View Pages  -  View pages in a Web site.

Enumerate Permissions  -  Enumerate permissions on the Web site, list, folder, document, or list item.

Browse User Information  -  View information about users of the Web site.

Open  -  Allows users to open a Web site, list, or folder in order to access items inside that container.

Now with that being said, these permissions are required due to how the NintexWorkflow/ApproveReject.aspx page checks if you are qualified to view the task. There are a number of checks that happen onpageload.

 

The first check this pages does is to see if the user has at least "EditListItems" permissions. (This is the "Edit items" permission level which is included in contribute). This is to confirm if you have permission to edit the ask item.

 

Next, the page will attempt to check if the user viewing the task matches the HumanWorkflowID of the user assigned to the task. This ID is stored within the Nintex Workflow database. This is to confirm if the task is assigned to the person requesting this item.

 

If the user does not match the HumanWorkflowID the page then checks if the user has elevated permissions via a custom "isadmin" check. The permission levels required by this "isadmin" check are the following:

Manage Permissions

Manage Web Site

View Pages

Open

Add and Customize Pages

As you can see these permission levels are the same as those included in the list above. The only difference being my list includes the dependent permission levels.

 

If you pass either the HumanworkflowID check or the "isadmin" check the page will display the task page successfully. All of the aforementioned permissions checks are done onpageload.

 

For reference those permissions are listed in full detail here: https://technet.microsoft.com/en-us/library/cc721640.aspx

 

Cheers,

Andrew Beals

Problem:

 

When publishing a form on any list in a site you find the following error:

The server encountered an error processing the request. The exception message is 'You can only publish, unpublish  documents in a minor version enabled list'

 

Relevant ULS trace log errors:

Failed to Save Nintex Form. Error: You can only publish, unpublish  documents in a minor version enabled list. Stack trace:  

at Microsoft.SharePoint.SPFile.PublishOrUnPublish(String comment, Boolean fPublish)   

at Nintex.Forms.SharePoint.NFDocumentLibrary.<>c__DisplayClass1b.<SaveForm>b__19()   

at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)   

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)   

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)   

at Nintex.Forms.SharePoint.NFDocumentLibrary.SaveForm(String contentTypeId, String listId, MemoryStream formStream, Boolean majorVersion)

Failed to Publish Nintex Form. Error: You can only publish, unpublish  documents in a minor version enabled list. Stack trace:  

at Microsoft.SharePoint.SPFile.PublishOrUnPublish(String comment, Boolean fPublish)   

at Nintex.Forms.SharePoint.NFDocumentLibrary.<>c__DisplayClass1b.<SaveForm>b__19()   

at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)   

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)   

at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)   

at Nintex.Forms.SharePoint.NFDocumentLibrary.SaveForm(String contentTypeId, String listId, MemoryStream formStream, Boolean majorVersion)   

at Nintex.Forms.SharePoint.Services.NfWcfService.PublishForm(String contentTypeId, String listId, Form form)

Cause:

Your NintexForms library at the site level does not have versioning enabled.

 

Resolution:

To resolve this issue navigate to the hidden NintexForms library at the site level using the following URL: Http://yoursite/NintexForms/Forms

Then navigate to Library Settings > Versioning Settings > Ensure the following feature is enabled:

 

I tried searching for site workflow examples on the forum and I didn't see a tremendous amount, so I thought I would write about a simple site workflow that appears to be requested often.  The workflow needs to remind the document owner when the document review date is three months away (giving them time to review and update the document).

To run through this blog post, ensure you have a document library in your site called "Procedure".  Ensure that this document library has the following columns:

  • Review Date (Date and Time:  Date Only) - mandatory
  • Document Owner (Person or Group) - mandatory

 

A site workflow does not get created in a list or library, but is accessible though Settings > Nintex Workflow 2013 > Create Site Workflow.  The workflow designer will open ready for you to start developing your site workflow.

The first thing we need to do is calculate the date in three months time (as we will be using this to compare to the review date).  We will need to save the calculated date into a variable.  Create a variable in your workflow of type Date and Time and name as appropriate.  In the example below I have named my variable vDate3MonthsAhead.

Add the "Calculate date" action to the design node on the workflow designer.  Double click to configure as follows:

CalculateDate.PNG

Now we have the date in three months time, we can query our procedures document library for all documents where the review date = our calculated date above.

The results returned from the query list action will need to be stored in a collection type variable, ensure you have one created.  In the example below I have named my collection variable vCollFilteredRecords.

QueryList.PNG

So I now have a collection of item IDs for the procedures that are due for review in three months time (note this collection could be empty).

For each policy returned, I want to email the document owner and inform them that the review date is approaching.  To do this I need to query the item to get some details about the document.

Drag a "For each" action to the canvas and double click to configure. The target collection is the output from the query list (so vCollFilteredRecords in my case) and the Store result in requires a variable to store the item in the collection's ID.  I have created another variable of type List Item ID called vListIDProcedureID:

ForEach.PNG

Inside the For each container I am going to query the list of the current item in the collection to get the properties I require, and store in relevant variables which will need to be created:

QueryList2.PNG

 

Finally, I will email the document owner for each item to inform them that the review is due in three months:

SendNotification.PNG

 

The completed workflow looks like this:

WF1.PNG

WF2.PNG

Publish the workflow.

Now, the clever bit.  This workflow needs to be scheduled to run daily, forever.

Settings > Nintex Workflow 2013 > Schedule Site Workflows > Add Schedule

Complete the schedule as follows:

Schedule.PNG

When attempting to publish a workflow in O365 you receive the following error:

 

 

JWT stands for Json Web Token. To learn more about what a JWT is you can read a short introduction here: JSON Web Token Introduction - jwt.io

 

The error message states simply that your token has expired due to a long running browser session.

 

To avoid having to do all your work over again you can simply refresh this token. You can do this by opening a new browser and re-opening the Nintex workflow designer.

 

This should create a new token and allow you to retry your publish operation.

Read from Documents using the Read document action

This actions allow you to read from Content Controls inside a Microsoft Word document.  When documents in a document library have these controls, Nintex Workflow has the ability to work with these controls.

Below you will see the steps needed to achieve reading from the Content Controls in a Word document.

Step 1:  Edit the template for the document in the document library

The document that is added to the document library needs to have the content controls in the template for Nintex to work with.  We therefore need to edit the template associated with the document library.  You can do this as follows:

  • Navigate to your document library, and access the Library Settings through the Library tab in the ribbon
  • Select Advanced settings under General Settings.
  • In the Document Template section, select Edit Template.

EditTemplate.png

  • This will open the document library document template in Microsoft Word.  In order to add Content Controls to the template, you need to have the Developer tab visible in the ribbon.  If this is not already visible, you need to
    select File and Options to open the Word Options form.  Select Customize Ribbon  from the left hand menu.  In the Choose commands from section, change the selection in the dropdown to be Main Tabs.  Choose Developer in the left hand box and select Add>> to move it to the right hand box.  Select OK to close the dialog.  You should now see the Developer tab in the ribbon.
  • The Content Controls are visible in the Developer tab in the Controls section and are highlighted below.

ContentControls.PNG

  • Add the desired Content Controls to the template in the desired locations.
  • Each content control needs a name to work with the workflow.  To name the content control, select it and choose Properties from the Controls section in the Developer tab.  Add the same name to Title and Tag fields in the Content Control Properties form ensuring there are no spaces.  It is advisable to make a note of what you name them as you will need to type these names into the workflow configuation later.

ContentControlProperties.png

  • Ensure all controls are named and the template is as you wish before selecting Save.  Close Word.
  • Test the template has saved by selecting Documents tab in the ribbon on your document library, then New Document.

 

Step 2: Create Workflow to read from the document

Now that the template is in place, the workflow is able to read from the content controls within it.  In this demo, I have created a content control called ctProject to store the Project number on the document itself (not within the document metadata).  I will use this project number to find the Project Manager and email them when a document is added.

  • Navigate to the document library and select Library tab in the ribbon, Workflow Settings and Create a Workflow in Nintex Workflow.
  • Select the blank template.
  • We need to store the information we read from the document in a variable, so we need to create one.  Select the Workflow Settings dropdown and choose Variables.  Create a new variable of type Single line of text called vTextProject.  Save and Close the variables window.
  • Drag a Read document action onto the first design node in the workflow designer.  Double click the action to open the configuration options.
  • Configure the action to read from the current document, specifying the name of the content control and the name of the variable to store the data in as below.

ReadDocumentConfig.PNG

  • In this example, I am going to use this variable to look up the project manager to send them an email.  To do this, I need to query the Projects list using the variable above and pull back the Project Manager.
  • We need to store the information we read from the Projects list in a variable, so we need to create one. Select the Workflow Settings dropdown and choose Variables. Create a new variable of type Person or Group called vPersonProjectMgr. Save and Close the variables window.
  • Drag a Query list action onto the next design node in the workflow designer. Double click the action to open the configuration options.
  • Configure the action to query the Projects list where Project is equal to the variable vTextProject.  Pull out Project Manager and store in vPersonProjectMgr.

QueryList1.PNG

QueryList2.PNG

  • Finally, let's email the Project Manager and cc the initiator of the workflow.  Add a Send notification action to the next design node and configure it as follows:

SendNotification.PNG

 

 

To see this in action, create a document using the template in your library, ensuring the project number added to the document is valid in the list of projects and run the workflow.

 

Please note - naming conventions for labels are just my preferred way of working, other people have different ways.  This was covered in the most recent Nintex Hangout which is mentioned in this thread: Nintex Style Guide

Write to Documents using the Update document action

This action allows you to write to Content Controls inside a Microsoft Word document.  I am very often asked if it possible to put an approval stamp on the document itself, rather than having the approval in the metadata of the document in the library.  The short answer is yes (although this will not be a signature, it will be the user ID of the approver and the date and time of approval).  Below you will see the steps needed to achieve this.

Step 1:  Edit the template for the document in the document library

The document that is added to the document library needs to have the content controls in the template for Nintex to work with.  We therefore need to edit the template associated with the document library.  You can do this as follows:

  • Navigate to your document library, and access the Library Settings through the Library tab in the ribbon
  • Select Advanced settings under General Settings.
  • In the Document Template section, select Edit Template.

EditTemplate.png

  • This will open the document library document template in Microsoft Word.  In order to add Content Controls to the template, you need to have the Developer tab visible in the ribbon.  If this is not already visible, you need to
    select File and Options to open the Word Options form.  Select Customize Ribbon  from the left hand menu.  In the Choose commands from section, change the selection in the dropdown to be Main Tabs.  Choose Developer in the left hand box and select Add>> to move it to the right hand box.  Select OK to close the dialog.  You should now see the Developer tab in the ribbon.
  • The Content Controls are visible in the Developer tab in the Controls section and are highlighted below.

ContentControls.PNG

  • Add the desired Content Controls to the template in the desired locations.
  • Each content control needs a name to work with the workflow.  To name the content control, select it and choose Properties from the Controls section in the Developer tab.  Add the same name to Title and Tag fields in the Content Control Properties form ensuring there are no spaces.  It is advisable to make a note of what you name them as you will need to type these names into the workflow configuation later.

ContentControlProperties.png

  • Ensure all controls are named and the template is as you wish before selecting Save.  Close Word.
  • Test the template has saved by selecting Documents tab in the ribbon on your document library, then New Document.

 

Step 2: Create Workflow to write to the document

Now that the template is in place, the workflow is able to write to the content controls within it.  In this demo, I have created content controls as follows:

NameDescription
ctReviewerThe ID of the person who completed the review task
ctReviewDateThe date and time of completion of the review task
ctApproverThe ID of the person who completed the approval task
ctApprovalDateThe date and time of completion of the approval task
ctReviewerCommentsThe comments left (if any) on completion of the review task
ctApproverCommentsThe comments left (if any) on completion of the approval task

 

I will use these controls when a document has been positively through the review and approval processes in the workflow.

    • Navigate to the document library and select Library tab in the ribbon, Workflow Settings and Create a Workflow in Nintex Workflow.
    • Select the blank template.
    • We want our document to go through review (to the Demo Reviewers SharePoint Group) and approval (to the Demo Approvers SharePoint Group) so we need two Assign flexi-task actions on the designer.
    • Double click the action to configure the first Assign flexi-task action as follows

AssignFlexiTaskReviewer.PNG

  • Note the above task has been assigned to a SharePoint group, but I have selected to Create individual tasks in order to capture who actually responded to the task to push into the document.
  • Double click the action to configure the second Assign flexi-task action as follows

AssignFlexiTaskApprover.PNG

  • Note the above task has been assigned to a SharePoint group, but I have selected to Create individual tasks in order to capture who actually responded to the task to push into the document.
  • In this example, we want to update the content controls inside the document only when the flexi tasks have been approved.  Drag an Update document action to the approval branch of each Assign flexi-task action.
  • For the approval under the review Assign flexi-task we need to configure the Update document action to update only the content controls assigned to the review data.  Double click the action to configure it as below, ensuring that the names entered into the configuration match those you entered into the document template for the document library.

UpdateDocumentReview.PNG

  • In the above configuration we are updating the content control ctReviewer with the system variable Last Task Respondent Display Name which is accessible using the insert reference book and looking under the Common tab.  This will give you the display name of the person who responded to the most recent task associated with this workflow.  We are updating the content control ctReviewDate with a concatenation of the system variables Current Date and Current Time to build the date and time of approval.  These are inserted using the insert reference book and looking under the Common tab.  Finally we update content control ctReviewerComments with the system variable Approver Comments which outputs the comments from the most recent task responded to in the current workflow and is added using the insert reference book under the Common tab.
  • For the approval under the approval Assign flexi-task we need to configure the Update document action to update only the content controls assigned to the approval. Double click the action to configure it as below, ensuring that the names entered into the configuration match those you entered into the document template for the document library.

UpdateDocumentApprove.PNG

  • In the above configuration we are updating the content control ctApprover with the system variable Last Task Respondent Display Name which is accessible using the insert reference book and looking under the Common tab. This will give you the display name of the person who responded to the most recent task associated with this workflow. We are updating the content control ctApprovalDate with a concatenation of the system variables Current Date and Current Time to build the date and time of approval. These are inserted using the insert reference book and looking under the Common tab. Finally we update content control ctApproverComments with the system variable Approver Comments which outputs the comments from the most recent task responded to in the current workflow and is added using the insert reference book under the Common tab.
  • To finish the workflow off we need to add some Send notification actions on the reject branches to let the initiator know that the document was rejected at review or approval stages.  Use the system variables mentioned above to ensure that the initiator knows why the document was rejected.

RejectionNotification.PNG

  • After the email has been sent on the rejection branches we want to end the workflow using the action End Workflow.
  • Finally, I have added a Send notification action at the very end of the workflow to inform the initiator that the document has successfully gone through review and approval stages.  The finished workflow looks like this:

UpdateWF1.PNG

UpdateWF2.PNG

  • Save and Publish the workflow giving it a descriptive title.


An example output of successful review and approve inside the document looks like this:

DocumentUpdated.PNG

Preface

There is never a shortage of questions around how web.config entries are added and why they don't get added to particular servers. We at Nintex follow the Microsoft supported guidelines in regards to updating the web.config. You can find that information here: Working with Web.config Files

 

How does this process work?

Our product updates the web.config files on servers using the SPWebConfigModification class of the Microsoft.SharePoint.Administration namespace, which allows you to dynamically register entities. These modifications are persisted in the configuration database where they function as a kind of virtual web.config that effectively serves as the final layer of the .config file stack for the SharePoint Foundation web application. The changes become effective when the SPWebService.ApplyWebConfigModifications method is called.

 

What does this process do?

The web application activation piece for Nintex Workflow and Nintex Forms adds the following entries to the web.config using the above method:

<SafeControl Assembly="Nintex.Forms.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c52d764dcf7ec883" Namespace="Nintex.Forms.SharePoint.WebControls" TypeName="*" Safe="True" SafeAgainstScript="False" />

      <SafeControl Assembly="Nintex.Forms.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c52d764dcf7ec883" Namespace="Nintex.Forms.SharePoint.WebParts.InitiateWorkflow" TypeName="*" Safe="True" SafeAgainstScript="False" />

      <SafeControl Assembly="Nintex.Forms.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c52d764dcf7ec883" Namespace="Nintex.Forms.SharePoint.WebParts.NFListFormWebpart" TypeName="*" Safe="True" SafeAgainstScript="False" />

    

<add expressionPrefix="NFResources" type="Nintex.Forms.SharePoint.NFResourceExpressionBuilder, Nintex.Forms.SharePoint, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c52d764dcf7ec883" />

     

    <authorizedType Assembly="Microsoft.SharePoint.WorkflowActions, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WorkflowActions" TypeName="HTLookupActivity" Authorized="True" />

        <authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Collections.Generic" TypeName="List`1" Authorized="True" />

        <authorizedType Assembly="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Collections.Generic" TypeName="List`1" Authorized="True" />

        <authorizedType Assembly="Nintex.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" Namespace="Nintex.Workflow.*" TypeName="*" Authorized="True" />

        <authorizedType Assembly="Nintex.Workflow, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" Namespace="Nintex.Workflow" TypeName="RunNowParameterOptions" Authorized="True" />

In addition, following web.config safe control entries are added during solution deployment of Nintex Workflow:

  <SafeControl Assembly="Nintex.Workflow.ServerControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" Namespace="Nintex.Workflow.ServerControls" TypeName="*" Safe="True" />

      <SafeControl Assembly="Nintex.Workflow.ServerControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=913f6bae0ca5ae12" Namespace="Nintex.Workflow.ServerControls.WebParts" TypeName="*" Safe="True" />

NOTE: This does not include the Nintex Live web.config modifications

 

Conclusion

Nintex leverages in place methods to ensure this process works without causing any unsupported updates to the web.config file. The updating of the web.config is executed by SharePoint code (more specifically the “Windows SharePoint Services Web.Config Update” timer job).

 

If you are seeing web.config entries not being added to a single server then I would recommend reviewing any issues with that web.config file or the server in question.

 

Cheers,

Andrew Beals

I have to admit that I had worked with Nintex Workflow for well over a year before I discovered these beautiful actions!  When I realised what they could do, I realised that I was repeating a lot of stuff in separate workflows unnecessarily.

Using these actions together allows you to store variable values and pass them between different instances of running workflows. Where might this ability come in handy?  Well I do not like to have workflow that are too large, so I occasionally break them down into smaller and more manageable chunks as separate workflows.  I join them together using the "Start workflow" action.  Often I will require an output from the workflows I start in the main workflow they are being started from.  Here's how to grab them:

 

Start workflow action

When configuring this to run, ensure you capture the instance ID in a text variable of the workflow you are starting.  This is required later when you retrieve whatever is returned and stored from the workflow you are starting:

Startworkflow.PNG

 

Store data

Whatever it is you want to store from the workflow you started and be passed back to the main workflow is configured here.  Choose to store the data to the current workflow instance, give it an appropriate name and then a value.

Storedata.PNG

 

Now comes the clever part, the retrieving of this value from the workflow we started in our main workflow:

Retrieve data

Make sure you are in the main workflow when you use this (so you store in the child workflow, and retrieve in the main workflow).

Configure this action to look at the instance variable we stored in Start workflow action, Item to retrieve (note this needs to be the same name as the "Store as" value in the store data action), and a variable to retrieve this data to.

Retrievedata.PNG

Now you have data from your other workflow in your main workflow!

It's not something I use very often, but it does still make me smile when I do

Enjoy!

Here is one approach to creating a holiday booking workflow that excludes weekends and bank holidays. The logic of this workflow is based on creating a collection variable containing the date range of the requested holiday dates, a collection containing the bank holidays and then checking these dates against each other to filter out the bank holidays. The key to this working is enforcing the date formats throughout the workflow.

 

STEP 1: Create a custom list called HolidayBooking with 2 date columns for DateStart and DateEnd. The end user will use the DateStart and DateEnd to define the duration of their holiday.

 

 

STEP 2: Create a list workflow on the HolidayBooking list with the following variables:

 

3_WorkflowVariables.png

 

 

STEP 3: Create a collection called varColBankHol containing the bank holiday dates. These dates will eventually be excluded from the requested date range.

 

  • Regular Expression:
    • Pattern: ;
    • Operation: Split
    • Input text: [Add bank holiday dates separated with semi-colons ";". Ensure there is no semi-colon at the end of the string as per screenshot below.]
    • Store results in: varColBankHol

 

 

 

Example:

The Bank Holiday collection (varColBankHol) looks like this:

02/05/2016;30/05/2016;29/08/2016;26/12/2016;27/12/2016

 

 

STEP 4: Add the start date and end date as variables.

 

  • Set variable: varDateStart = StartDate
  • Set variable: varDateEnd = EndDate

 

4_SetVariable.PNG

 

 

STEP 5: Create a collection called varColRequestedDates containing the range of requested holiday dates ensuring they are formatted as dd/MM/yyyy. After the loop add the end date to the varColRequestedDates collection.

 

  • Loop: until varDateStart = varDateEnd
  • Collection operation:
    • Target collection: varColRequestedDates
    • Action: Add
    • Value: fn-FormatDate(varDateStart, "dd/MM/yyyy")
  • Calculate date: varDateStart + 1 day
  • Collection operation:
    • Target collection: varColRequestedDates
    • Action: Add
    • Value: fn-FormatDate(varDateEnd, "dd/MM/yyyy")

 

 

7_LoopUntil.PNG

 

 

Example:

The resulting collection (varColRequestedDates) based on a start date of 27th May 2016 and an end date of 2nd June 2016:

27/05/2016;28/05/2016;29/05/2016;30/05/2016;31/05/2016;01/06/2016;02/06/2016;

We next need to filter out the weekends and bank holidays from this range. 28/05/2016 & 29/05/2016 are weekend dates and 30/05/2016 is a bank holiday.

 


STEP 6: Remove weekends from the varColRequestedDates collection of requested dates.

 

  • For each:
    • Target collection: varColRequestedDates
    • Store results in: varDate1
  • Run if:
    • Condition: If any value equals value

Value: fn-FormatDate(varDate1, "dddd")

does not begin with

S

  • Collection operation:
    • Target collection: varColBusDates
    • Action: Add
    • Value: fn-FormatDate(varDate1, "dd/MM/yyyy")

 

 

 

Example:

The resulting collection (varColBusDates) with the weekend dates removed:

27/05/2016;30/05/2016;31/05/2016;01/06/2016;02/06/2016;

We removed 28/05/2016 & 29/05/2016 from the collection.

 

 

STEP 7: Now we have a collection variable containing a range of dates that excludes weekends. We now need to exclude bank holidays.

 

  • For each:
    • Target collection: varColBusDates
    • Store results in: varDate1
    • Stop processing: varYNEndLoop
  • Collection operation:
    • Target collection: varColBankHol
    • Action: Exists
    • Value: fn-FormatDate(varDate1, "dd/MM/yyyy")
    • Store results in: varYNExists
  • Run if:
    • Condition: If any value equals value

Workflow Data: varYNExists

equals

Value: Yes

  • Collection operation:
    • Target collection: varColBusDates
    • Action: Remove by value
    • Value: fn-FormatDate(varDate1, "dd/MM/yyyy")
  • Run if:
    • Condition: If any value equals value

Value: fn-FormatDate(varDate1, "dd/MM/yyyy")

equals

Value: fn-FormatDate(varDateEnd, "dd/MM/yyyy")

  • Set variable: varYNEndLoop = Yes

 

8.png

 

 

Example:

The resulting collection (varColBusDates) with the bank holiday dates removed:

27/05/2016;31/05/2016;01/06/2016;02/06/2016;

We removed 30/05/2016 from the collection.

 

 

We now have a collection of dates based on a date range specified by the user that excludes weekends and bank holidays.

 

Mitch

You may see the following errors when configuring your Nintex Live installation:

 

Errors:

PartialChain: A certificate chain could not be built to a trusted root authority.

RevocationStatusUnknown: The revocation function was unable to check revocation for the certificate.

OfflineRevocation: The revocation function was unable to check revocation because the revocation server was offline.

 

This resolution to this issue is to reinstall the certificates installed by Nintex during the installation.

 

1. Go to Central Admin -> Security -> Manage Trust

 

2. Delete the following Nintex Certificates: (PLEASE NOTE: certificates installed by Nintex may change in the future)

     a. Baltimore CyberTrust Root.crt

     b. GTECyberTrust Global Root.cer

     c. Microsoft Internet Authority.cer

     d. Microsoft Secure Server Authority.cer

     e. Thawte Primary Root CA.cer

     f. Thawte SSLCA.cer

     g. Thawte SSL CA_SHA2.cer

 

3. Run installer up to this step then extract files to a folder on local machine

 

4. Navigate to ‘Certs’

 

5. Go back to Central Admin -> Security -> Manage Trust and upload certificates one by one. Please ensure certificate names are consistent.

 

 

6. Test the Live Connection again in Central Administration

---DISCLAIMER---

 

THE FOLLOWING IS NOT GUARANTEED TO RESOLVE THIS ISSUE.

 

RE-MIGRATING YOUR SITE DATA IS THE ONLY SUPPORTED METHOD TO SOLVE THIS ISSUE

 

---DISCLAIMER---

 

====================================================================================

The supported Migration Documentation can be found here:

Migrating/ Upgrading - What you need to know:

https://community.nintex.com/docs/DOC-1088

Migrating Nintex Workflow FAQs:

https://community.nintex.com/docs/DOC-1008

====================================================================================

 

 

Error messages that indicate/relate to the issue:

 

  • Error occurs when attempting to activate the Nintex Workflow site collection features:

The field with Id {} defined in feature {} was found in the current site collection or in a sub site.

contenttype1.png

Note: the exact Id may vary depending on which content type is found. You can find the list of Nintex content types and their ID’s here:

https://community.nintex.com/community/build-your-own/blog/2015/09/17/quick-reference-for-nintex-workflow-features-content-types-and-field-ids

 

  • Error occurs when attempting to publish a Nintex workflow:

Server was unable to process request ---> Column 'NintexWorkflowID' does not exist. It may have been deleted by another user.

 

contenttype2.png

 

  • Missing Site Content Types:

You will see multiple missing content types when navigating to Site Actions > Site Settings > Site Content Types > Nintex Workflow at the site collection root.

These are the Content types that should be showing up in the environment and should always be inherited from the Site Collection root:

contenttype3.png

If you find that any of the above content types exist on a subsite and are not inherited from the site collection root (top level site of that site collection) this is an indication that you have orphaned content types.

 

Cause:

 

This issue commonly occurs when subsites are imported in to a site collection that does not have the Nintex Workflow Site collection feature enabled.

 

These errors happen especially when using Metalogix to migrate.  If you used Metalogix to migrate, please contact Metalogix support for assistance.

 

The process below has been found to resolve this issue in some cases; however, we strongly recommend you follow the Nintex migration documentation to resolve this issue.

That documentation can be found here: Migrating/Upgrading - What you need to know

 

Finding Affected Sites:

 

Using the script in the article below, you can identify all sites in a site collection that are using Nintex Content Types.

How to quickly identify Nintex Content Type usage in SharePoint

The root site of the site collection is the only site that should have the content types, all other sites inherit from the root.

Run the script from the link above, updating the last line with your Site Collections URL if you do not want to run this against all site collections in the farm. For example:

Get-SPSite https://SiteCollectionURL | Get-SharePointWebsContainingNintex | Get-SharePointListCollection | Get-SharePointListContainingNintex | FT Title, ParentWeb

 

Possible Workaround (Not guaranteed to work):

 

Once you have located the subsites that have the Nintex Content Types associated with them you will need to export these sites using the powershell export-spweb command.

Next delete the site and empty it from the Recycling Bin and Second Stage Recycling bin (this is a critical step!)

Once the problematic sites are fully removed, activate Nintex features on the Site Collection by going to Site Actions > Site Settings > under Site Collection Administration choose Site Collection Features > Nintex Workflow 20xx

After successfully activating the features without errors you can then complete an import-spweb of each of the subsites that you exported.

 

Only resolution is to re-do migration using our migration documentation, which is database attach method.

Filter Blog

By date: By tag: