Vadim Tabakman

Database Connection Strings
LDAP Paths
Web service URLs
Exchange URLs
User Credentials

When moving Nintex Workflow workflows from one environment, such as QA or Development, to another environment such as Production, the above things most likely will change. Most companies will design their workflows, and then after testing and approval, they will move the workflow to Production. What they don't want to do, is modify the workflow when it's Production.

That would defeat the purpose of having the testing phase.

This is where the Workflow Constants come into play. As long as they are named the same in both environments, then workflows that use the constants will function correctly, and will require no modifications in different environments.

Where do I create constants?

You can create constants at the Farm level.

Go to Central Administration->Application Management, and in the Nintex Workflow Management section, click on Manage Workflow Constants.


These constants will be available to every workflow that is designed in your farm.

You can also create constants at the Site level or even the Site Collection level.

On your site, go to Site Settings, and in the Nintex Workflow section, click on Manage Workflow Constants.


You have a choice of 4 types of contants to create.
String
Number
Date
Credential

This should cover all your needs you might have.

Connecting Strings, LDAP Paths etc can call be stored in a String variable.
Credentials that you might want to use in the Execute SQL, Call Web Service or AD related actions, can be created as well, using the credential type.

Creating a Workflow Constant

When you create a constant, you will be provided with the following page :


Most of the fields are self-explanatory, but the last two are interesting.

Sensitive - are for those constants taht you want to be stored encrypted. You may want to do this for Connection Strings that have username/passwords in them. Credential type constants are autoamtically stored in an encrypted form.

Constant is only visible to Administrators - this should be used, if you want to create constants for LDAP Paths and you don't want anyone but administrators performing that sort of functionality in Nintex Workflows.

Using Workflow Constants

I'm going to create a String constant, and store a database Connection String.



As you can see, I gave it a very descriptive name, so that when I need to use it, it'll be easy for me to identify.

I can then go to my workflow, add an Execute SQL action, and when I go to configure the action, I can click on the Insert Reference icon to the left of the Connection String. In the Insert Reference popup, you can scroll to the bottom and see the section for Workflow Constants.



Conclusion

Using Nintex Workflow Constants is that simple. Now when I am happy with my workflow, I can export it, and import it into production. As long as I have the same named Workflow Constant in that environment, then everything will work as expected.

The Workflow Constant functionality, is just another way of making your workflow dynamic in nature. If you decide to go ahead and move a Database to another server, you can simply update the constant, and all your workflows that rely on it, will automatically be updated. No modifications to the workflows or republishing required.

Posted by Vadim Tabakman Sunday, February 5, 2012 10:48:00 PM Categories: Constants Execute SQL Nintex Nintex Workflow
Copyright Vadim Tabakman
Rate this Content 0 Votes

Comments

Monday, October 22, 2012 10:30:07 PM
Lindon Morris

re: Nintex Workflow - Workflow Constants

Is there any way to work with contants via a command line (ideally Powershell)?

 

Specifically, i'd like to create, modify and delete credential constants.

Monday, October 22, 2012 10:46:31 PM

re: Nintex Workflow - Workflow Constants

Hi Lindon,

Credential constants are considered "sensitive", which means their values are encrypted.  So you can't manipulate those with PowerShell.

Other credentials, that don't have the "senstive" checkbox checked, you should be able to manipulate.

Note: you can export and import workflow constants using the NWAdmin command line tool.

The export is an XML file.  So you should be able to export, modify and import using PowerShell.

Hope that helps.

cheers,

Vadim

Monday, June 16, 2014 5:37:54 AM
Arun
Gravatar

re: Nintex Workflow - Workflow Constants

Hi Vadim,

While creating Workflow constants it will store in SQL DB and the same will in the plain text format.. Is it possible to encrypt the same password instead for plain text.. Thanks in advance for your suggestions. 

Thanks

Arun 

Monday, June 16, 2014 11:00:31 AM

re: Nintex Workflow - Workflow Constants

H Arun,

I believe if you tag the constant to be "Sensitive", it will encrypt it.

This is done on the Workflow Constant page.

cheers,

Vadim

Tuesday, June 17, 2014 7:14:00 AM
Arun
Gravatar

re: Nintex Workflow - Workflow Constants

Thanks for your reply vadim! I tried to do the same, but still its showing as plain text if i select the sensitive option.. 

If i use secure string option, then password is encrypt, but this is not working while passing in the connection string. 

error message: Logon fail to the database server and if i use the plain text password in the connection string its working fine..

Please suggest further.. Thanks!

Tuesday, June 17, 2014 7:49:21 AM

re: Nintex Workflow - Workflow Constants

Hi Arun,

on that, I'm not sure.  It should work.  I'd suggest you email Nintex Support.  There may be an issue with your version of Nintex Workflow.

cheers,

Vadim

Friday, May 8, 2015 10:03:49 AM
Matthew
Gravatar

re: Nintex Workflow - Workflow Constants

Hi Vadim,

First off, I would like to thank you for your efforts.  Many of your posts have been very helpful as I continue to learn more about Nintex and SharePoint.

I have a parent Sharepoint site with several sub-sites.  One of these sub-sites is a calendar that executes a workflow when new items are submitted.  Many of the workflow actions perform a List Lookup to pull data from one of the other sub-sites (Set Variable for example).  I would like to assign a workflow constant to the other sub-site and use that in place of the List Lookup so I can easily copy this 'test' environment to a 'production' environment.  I have tried to set a string workflow constant to the url of the List, but in the Set Variable Action when I change the source from LIst Lookup to my workflow constant, nothing happens- meaning I don't get the same drop-downs that are present when using List Lookup.

I am assuming my url path syntax is incorrect, so would you mind providing an example?

Thank you,

Matt

 

Saturday, May 9, 2015 12:14:09 AM

re: Nintex Workflow - Workflow Constants

Hi Matt,

I've never tried it this way.  What I would recommend, is if you're trying to get data from another list, try using a Query List action.

Configure it as if the list exist on the current site.  This lets you do all the filtering/sorting etc with the nice UI.  Then go into CAML Editor mode and you'll see the list is actually and ID.

So now, you can replace that ID with the constant that contains the ID.

Hope that helps.

cheers,

Vadim

Wednesday, May 13, 2015 6:48:14 AM
Collin Ames
Gravatar

re: Nintex Workflow - Workflow Constants

OK, dumb question:  when I make a constant sensitive, how do I reference it in workflow actions like the body text of a notification?  I would think it would be something along the lines of {WFConstant:constantname}, but that just comes across as text.  Thanks!

Wednesday, May 13, 2015 7:39:58 AM

re: Nintex Workflow - Workflow Constants

Hi Collin,

 

Sensitive constants can only be used in certain places, like DB connection strings and LDAP paths.

cheers,

Vadim

Wednesday, May 13, 2015 10:49:15 AM
Collin Ames
Gravatar

re: Nintex Workflow - Workflow Constants

Thanks for the quick response!  I was afraid that was going to be the answer, but had to ask!

 

 

Monday, May 25, 2015 2:58:08 PM
Keith B
Gravatar

re: Nintex Workflow - Workflow Constants

Hello.

Sorry if this is a little off topic.

I am trying hard to find a way to open the Edit Form of a list item (not current item) from Nintex workflow. Is there a simple way to open a URL from a workflow action?

I use the workflow to create item in another list. I store the ID of the current item in a number field in the second list.

Thanks.

Keith

Monday, May 25, 2015 3:02:38 PM
Keith B
Gravatar

re: Nintex Workflow - Workflow Constants

Hello.

Sorry if this is a little off topic.

I am trying hard to find a way to open the Edit Form of a list item (not current item) from a workflow action. Is there a simple way to do this? .

I create a new item in a second list and store the ID from the current item in a number field in the second list.

I just want to open the URL of the Edit Form from workflow then end the workflow, and have it show the newly created item.

Monday, May 25, 2015 4:52:19 PM

re: Nintex Workflow - Workflow Constants

Hi Keith,

As workflows run on a server, there's not way to get the workflow to open up a form.  You can build a url to the edit form and then send that to a user via email or Lync, but you can't get a workflow to open up a page on a users browser.

cheers,

Vadim

Wednesday, June 17, 2015 9:10:32 AM
René Fritsch
Gravatar

re: Nintex Workflow - Workflow Constants

Hi Vadim,

is it possible to set permissions on a Nintex Credential Constant (farm level) via SDK/code? We're creating a constant during a solution deployment and also populate it with a value. By default, only administrators seem to be able to use this constant. What we want to achieve is, to grant access to this credential constant for one or more AD security groups.

Thanks for your help!

Wednesday, June 17, 2015 3:40:16 PM

re: Nintex Workflow - Workflow Constants

Hi Rene,

you can define Nintex Workflow constants at the Site, Site Coll or Farm levels.

Then you can assign permissions at each level by clicking on the Set Permissions button on the ribbon of the constants page.

cheers,

Vadim

You must sign in to this site to post comments.
Already Registered?
Sign In
Not Yet Registered?
Register





 

Statistics

  • Entries (257)
  • Comments (1765)

Categories