Tuesday, May 11, 2010

iTFA and Nintex: Open iTFA perspective from Nintex Workflow

Recently iTechnology signed strategic partnership with Nintex (read more here) and now is time to talk about how to combine iTechnology Forms Accelerator and Nintex Workflow 2007 to get the best from both products. This is the first post from our “iTFA and Nintex” series and today will focus on how to open iTechnology Forms Accelerator form by calling specific perspective name from Nintex Workflow.

Intro

iTechnology Forms Accelerator is a product that provides electronic forms for Window SharePoint Services 3 and Microsoft Office SharePoint Server 2007. The main idea that stays behind is to give business users an easy to use and intuitive tool so that they can create forms by themselves with ease, and the same time powerful enough so that IT pros can use it in their solutions for the most complicate scenarios. There are many features that every user can benefit from – strict version control, web-based designer, easy publishing and exporting of a form. For all features you can read here or in iTFA documentation, or watch how-to videos in iTechnology channel in Youtube.

iTechnology Forms Accelerator provides the opportunity to open a form by calling a specific perspective name. To do this, few parameters are required:

  • List ID – the GUID of a SharePoint list that is integrated with iTFA

  • Item ID – the ID of an item user wants to see

  • Perspective name – the name of the perspective to show


By default there are 3 perspectives in an iTFA form – New, View and Edit. These perspectives represent the possible states of a SharePoint item – when is being created (“New” perspective), when is opened for view (“View” perspective) and when is opened for edit (“Edit” perspective). Besides this, user can create custom perspectives with the condition that each perspective should have unique name. Note that adding/deleting perspectives is only available for forms in “Advanced” mode (for more details check iTechnology Forms Accelerator documentation).

So, what we need is a SharePoint list that is integrated with iTechnology Forms Accelerator and has a Nintex Workflow created for it. Let’s start step by step …


Step 1

Create a list and add some columns for it (if needed). Once the list is created, have to integrate it with iTechnology Forms Accelerator. I will not stop on how to integrate and create a form, since this topic is already covered in our how-to videos and iTFA documentation. What have to mention here, is that since I want to open specific perspective my form has to be in advanced mode (the default mode is “Starter”). To change it, open Pie menu, select “Advanced” section and click on “Settings” item. There select “Advanced” under Mode section and click OK to save the changes:

Now I can add additional perspectives which I'm going to use later from my Nintex workflow. For example one can be “Details” perspective and will use it to display request details.

Step 2

My iTFA form is ready, saved and published. Now I want to include a link to the “Details” perspective in my workflow. As I already said, to open a specific iTechnology Forms Accelerator perspective have to include the parameters listed above. All these values are available in Nintex workflow details (except for perspective name that will add directly). The URL looks like this:
{web} /_layouts/itfa/iTFADynamic.aspx?List={list GUID}&ID={list item id}&PN={perspective name}

To simplify further usage, I have prepared a method that can register as a Nintex Inline Function and then invoke in the workflows.

Few points when creating custom Nintex Inline Functions:

  • Methods should be static and public

  • Use parameters that can be parsed from text

  • Assembly should be strong-named and registered in GAC


Next – have to register my method as an inline function in Nintex. This is done with the help of NWADMIN.EXE utility and “AddInlineFunction” operation:
NWAdmin.exe -o AddInlineFunction -functionalias FunctionAlias -assembly AssemblyName -namespace Namespace -typename TypeName -method MethodName

In my case the command will look like:
NWAdmin.exe -o AddInlineFunction -functionalias "fn-iTFADynamicLink" -assembly "iTFA.Extentions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxx" -namespace "iTFA.Extentions.iTFADynamicLink" -typename "iTFALinkGenerator" -method "CreateDynamicLink"

You can read more about “AddInlineFunction” operation here (as well for all other operation available in nwadmin).

Step 3

In my scenario I want to add a link of my iTFA form in a mail to the user who started the workflow so that he/she can open and view it. This is why I created a text variable called “iTFA Link” and then added “Build dynamic string” action to my workflow:

For the content of the build string operation used my inline function and passed parameters in the order they are required:
fn-iTFADynamicLink({Common:WebUrl},{ItemProperty:ID},{Common:ListID},"Details")

The result from this call is then assigned to my variable and I can use it to create the proper link:

And add it in an email:


As you can see working with iTechnology Forms Accelerator and Nintex is easy, but most of all - definitely useful! Follow us for the next parts of iTFA and Nintex series.
Bookmark and Share

No comments: