Category Archives: Nintex

Nintex Workflow – Custom Inline Function

Hi everyone. Today I want to show you how you can develop custom inline functions for the Nintex Workflow product for SharePoint.

I got the idea from here (Absolutely great post.) but I created a SharePoint solution file because I thought this would be a bit simpler to use.

First open Microsoft Visual Studio and create a new Empty SharePoint Project. Remember to deploy it as a farm solution.

nintex_custom_inline_new_sharepoint_project

Now add a new Class. I called mine “Function.cs”.

nintex_custom_inline_code

Here is some example code I added to my class. (I got the code also from here.)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CustomNintexInline
{
class Function
{
public static int Random()
{
Random rnd = new Random(Environment.TickCount);
return rnd.Next();
}

public static int Random(int _iMax)
{
Random rnd = new Random(Environment.TickCount);
return rnd.Next(_iMax);
}

public static int Random(int _iMin, int _iMax)
{
Random rnd = new Random(Environment.TickCount);
return rnd.Next(_iMin, _iMax);
}
}
}

Now build your project.

After you successfully built your project run cmd as Administrator and go to the following path:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

Next run the following code to retrieve the Public key token:

sn.exe -T "Path-To-Your-dll/Project.dll"

Write down the value of your Public key token you will need it later.

nintex_cutom_inline_sn

Next you need to add your solution file to your SharePoint Farm. Do this by running PowerShell as Administrator and by running the following commands:

Add-PSSnapin Microsoft.SharePoint.PowerShell
Add-SPSolution "Full-Path-To-Your-WSP/Project.wsp"

nintex_custom_inline_add_solution

Next open your SharePoint Central Administration and deploy your solution globally.

nintex_custom_inline_solution

Next go to:

C:\Program Files\Nintex\Nintex Workflow 2010

Now run cmd as Administrator and run the following code to add your custom inline function to your Nintex Workflow product:

NWAdmin.exe -o addinlinefunction -functionalias "fn-Random (The string alias used to use your function later in your workflows)" -assembly "CustomNintexInline, Version=1.0.0.0,  Culture=neutral, PublicKeyToken=<Value you retrieved before by using sn.exe> (dll data)" -namespace "CustomNintexInline (Namespace of your Project)" -typename "Function (Class of your Project containing your function)" -method "Random (Method/Function name in your Project)" -description "<A short description what your function does>" -usage "<How to use your function>"

If the above command finishes without error messages your custom inline function has been successfully added to your Nintex Workflow product.

nintex_custom_inline_nwadmin

Next run cmd as Administrator and run the following command to restart IIS:

iisreset

That´s it. Now your custom inline function should be available. To test it I created a simple Nintex Workflow:

nintex_custom_inline_test_workflow

When you go to Inline Functions in one of your Nintex Workflow Actions you will find your custom inline function. (Called “Random” in my example)

nintex_custom_inline_use

Here you can see the result of my Test workflow:

nintex_custom_inline_test_mail

As you can see everything worked as expected and your custom inline function is ready to use. I hope you liked my today´s post. See you next time.

As always you can download my code from here.

Sources:

http://www.vadimtabakman.com/nintex-workflow-developing-a-custom-inline-function.aspx

Tagged ,

Nintex Workflow – Enable Lazy Approval

Hi everyone. Today I want to show you how you can setup Nintex Workflows Lazy Approval feature. The Lazy Approval feature allows your users to reply to mails sent by User Interaction Tasks (like Flexi Task) with a valid term to either Approve or Reject the Action.

Since this feature is pretty popular I thought I should post about how to set it up so you can enable this feature for your users.

Prerequisites:

  • You will need an E-Mail Server for your test users. (I explained how to setup a simple Development Mail Server here.)
  • Nintex Workflow installed on your SharePoint Web Servers (I blogged about this topic here.)

SMTP Server Installation

The first thing you need to do is to install the Windows Feature SMTP Server on your SharePoint Web Server (in my example the Web Server is called: sp.intranet.com).

nintex_workflow_lazy_approval_install_smtp

Check the Advanced Settings in the Delivery Tab of IIS6 Manager if the FQDN of your SharePoint Web Server is entered correctly and you´re good to go.

Important: Make also sure that the Simple Mail Transfer Protocol services Startup Type is set to Automatic to make sure the service will be started when you reboot your server.

nintex_workflow_lazy_approval_delivery

That´s it. Your SharePoint Web Server is ready.

Central Administration Settings

Open up your SharePoint Central Administration and open up the Incoming E-Mail Settings page.

Now choose Yes and Automatic for Enable Incoming E-Mail and click on OK.

nintex_workflow_lazy_approval_incoming_mail

Next go to the Outgoing E-Mail Settings page.

Now enter the name of your E-Mail server in the Outbound SMTP server text box. (I chose my Development Mail Server smtp.intranet.com I used in this blog post.)

nintex_workflow_lazy_approval_outgoing_mail

Now go to your Nintex Workflow Management page and go to LazyApproval Settings and click on Enable / Disable LazyApproval for the current server farm.

nintex_workflow_lazy_approval_enable_lazy_approval

Now enter the E-Mail address which shall be used by the Lazy Approval feature and click on OK.

nintex_workflow_lazy_approval_enable_lazy_approval_mail

After you have clicked on OK your will be redirected to the LazyApproval Settings page. On this page you can configure terms which your users can use to respond to workflow tasks.

nintex_workflow_lazy_approval_terms

That´s it. The Lazy Approval feature is now ready to use.

Example Workflow

To test the Lazy Approval feature just create a new Nintex Workflow.

nintex_workflow_lazy_approval_test_workflow_creation

Add a Flexi task feature and open the Configuration page of the Flexi task.

nintex_workflow_lazy_approval_test_workflow_finished

Now check the check box next to Allow Lazy Approval and click on OK.

nintex_workflow_lazy_approval_flexi_task_enable

Now Publish your Workflow and start it.

nintex_workflow_lazy_approval_test_workflow_start

Your users will receive a mail like the below one:

nintex_workflow_lazy_approval_mail

Now all your users need to do is to Reply on this mail with a valid term. For example: yes to Approve the task.

nintex_workflow_lazy_approval_mail_response

As you can see our Example Workflow took the Approve route as expected.

nintex_workflow_lazy_approval_test_workflow_mail_approve

Here is the overview of the Workflow:

nintex_workflow_lazy_approval_test_workflow_completed

That´s it. It is as easy as this to enable Lazy Approval for your users. I hope you liked my post. See you next time.

Sources:

http://sharepointjeff.blogspot.co.at/2014/02/nintex-setting-up-lazy-approval.html

Tagged ,

Nintex Workflow for SharePoint – Installation

Hi everyone. Today I want to show you ho you can setup your own Nintex Workflow Development environment. I thought a short tutorial would be good since you can easily run into errors when you miss a step.

As you may know Nintex Workflow is one of the most popular 3rd party products for SharePoint and a pretty good workflow engine. To setup your own Development environment you need to do the following:

Getting a Development license

You can get a Development license from here. All you need to do is to fill out a form with your personal data. After you have sent your data to Nintex you will receive an Email containing your license file and a download link of the Nintex Workflow product.

Important: Nintex does not accept free Mail addresses like googlemail.com in their Development license request form and the Development license will lose its validity after 30 days.

The Installation

Important: Nintex Workflow needs to be installed on every SharePoint Web Server in your SharePoint Farm.

Before you start the Install Wizard you need to do the following:

Set the User Account Control settings on the lowest level and reboot your server. If you miss this step you might run into errors preventing the Install Wizard from adding the solution files to your farm.

nintex_workflow_install_uac

Now run the Install Wizard as a SharePoint Farm Administrator and wait till the Wizard has finished his work.

nintex_workflow_install_wizard_finish

Important: After the installation has finished you should set your User Account Control settings back to the Default value and remember to reboot your server.

As you can see the solutions have been added to your farm.

nintex_workflow_install_solution_not_deployed

Now you need to deploy them globally. (Just click on the link and choose Deploy.)

nintex_workflow_install_solution_deployed

Now you need to import your license.

nintex_workflow_install_license

The next step is to create a database where the Nintex product can store its data.

nintex_workflow_install_db_create

As you can see in the below screenshot the database setup will look like this:

nintex_workflow_install_db_ready

Now you need to activate Nintex Workflow on every Web Application you want to use it.

nintex_workflow_install_web_activation

Now go to Manage Allowed Actions and check every action you want to allow to be used in your workflows.

nintex_workflow_install_manage_allowed_actions

Activating the features

Now go to your Site Collection where you want to use Nintex Workflow.

Activate the following Site Collection features:

  • Nintex Workflow 2010

nintex_workflow_install_site_collection_feature

Activate the following Site features on the Sites where you want to use Nintex Workflow:

  • Nintex Workflow 2010

nintex_workflow_install_site_feature

That´s it. Your Development environment is now ready to use.

I hope today´s post was interesting for you. See you next time.

Sources:

http://www.nintex.com/en-US/Pages/default.aspx

Tagged ,