Nintex Connect

The Official Community Site for Nintex Software Products, including Nintex Workflow 2007, 2010 and 2013; Nintex Workflow for Project Server 2010; Nintex Reporting 2008 and Nintex Analytics 2010; Nintex Forms 2010; Nintex Live and Nintex SmartLibrary.
Welcome to Nintex Connect Sign in | Join | Help
in Search

Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

Last post 05-15-2009, 11:56 AM by Cameron_McConnell. 13 replies.
Sort Posts: Previous Next
  •  01-23-2009, 11:43 PM 2289

    Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    I am a new user of NW and I am enthusiastic about developing workflows, but I run into the need to perform more advanced calculations (even at the level of calling user defined functions) from those offered in the standard set of NW actions.

    So far I found two methods to achieve this:

    A) By using SQL

    B) By using Web Services

    Here is the description of the first method (using SQL):

    1) Create in an MS SQL Server (or other RDBMS) a table with one field (arbitrary field name ) and one record (arbitrary field value). Let us name it xTable.

    2) In your Workflow insert "Execute SQL" actions and use SQL commands like:

    - select substring('{ItemProperty:Title}',1,3) from xTable  (using standard RDBMS functions)

    - select dbo.f('{ItemProperty:Title}')  from xTable  (using scalar user defined functions)

    Here is the definition of the simplistic function f just for demonstration purposes:

    CREATE FUNCTION f (@x varchar(50) = '') 
    RETURNS varchar(50) AS 
    BEGIN
    declare @y varchar(50)
    select @y = Upper(@x) + '>>'
    return @y
    END

    So this method exploits the capabilities of the SQL language and  the RDBMS system.

    Now I will describe the (more) orthodox and flexible method (web services): 

    1) Create a asmx file using notepad or VS 2005 similar to the following:

    <%@ WebService Language="VB" Class="TempConvert" %>

    Imports System
    Imports System.Web.Services

    Public Class TempConvert :Inherits WebService

    <WebMethod()> Public Function WSF_UCase (ByVal xVar As String) As String
     
      return UCase(trim(xVar))
    end function

    ... other user defined functions .... 

    end class

    Name it xxx.asmx  and copy it into : C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\CustomWebServices

    where CustomWebServices is a new sub-folder which should be created by you.

    2) In your Nintex workflow add a "Call Web Service" Action, put as Url the following : http://yoursite/_layouts/customwebservices/xxx.asmx and now you can calculate your workflow variables using the functions in your xxx.asmx file.

    Now you have the (almost) unlimited capabilities and flexibility of web services !!!

    I hope that this post will be of some help to some colleagues in the NW community.

    Best Regards from Athens Greece,

    Stratos Parellis

     

  •  03-15-2009, 9:04 PM 2867 in reply to 2289

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    And I'll add to this that in the next build, we are going to support inline functions that can be used in any of the insert reference text inputs. So you will be able to type in, for example fn-ToUpper({ItemProperty:Title}) and it will evaluate at runtime.

    You will also be able to register any extra functions that you need by specifying the .NET type and method to invoke.

    cheers

    James

  •  04-09-2009, 2:46 PM 3350 in reply to 2867

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    Hi James,

     Where are the new functions documented?

    Thanks

  •  04-09-2009, 4:00 PM 3351 in reply to 3350

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    They are documented in hte Help Files, located here: http://connect.nintex.com/files/folders/nw_help/entry1549.aspx

    Look in the section "Using the Workflow Designer > Inline functions".

  •  04-13-2009, 1:41 AM 3387 in reply to 3351

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    Are you sure the help files referenced in that link have been updated? The link has a date from 2008 and the CHM I downloaded did not have any entries for inline functions
  •  04-23-2009, 4:51 AM 3516 in reply to 3387

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    The help files are not updated yet. I downloaded the file to (kinda stupid...), but still no Inline Function reference...
  •  04-27-2009, 2:43 PM 3582 in reply to 3516

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    Strange...

    Can you try this link instead please? http://www.nintex.com/en-US/Support/Documents/NintexWorkflow2007Help.chm

  •  04-27-2009, 6:55 PM 3593 in reply to 3582

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    Morning,

    Thanks for the reply. I downloaded this file via the link, but I still do not have to inline functions help references. Searching for "fn-" does not show any result...!?

    Maarten

  •  04-29-2009, 4:36 PM 3644 in reply to 3593

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    Have a look for it here and let us know if you still can't find it: Nintex Workflow 2007 > Using the Workflow Designer > Inline functions.
  •  05-05-2009, 12:03 AM 3703 in reply to 3644

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    HI all,

     

    I am in the pre-sales/trial period and inline functions are something of interest to me as well.  I have tried the links post above and still have not been able to find the reference.  I also tried finding it on the site as mentioned in the last post without any luck.

     

    I am really hopeing this with help with things like date calc (date +/- date, etcs)

     

    Thanks

  •  05-14-2009, 5:50 PM 3904 in reply to 3703

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    Attachment: NitextHelpError.JPG

    All the contents links are invalid in the Compiled Help file downloaded from the url provided above, and from your Support page Download link. The index is either missing or invalid. The error is "Cannot find Server or DNS error" for every item in the index. Evidently there is an internal Nintex host name in there somewhere and so it probably works fine for Nintex people but nobody else. All we see is the table of contents, but get an error page for every item in the Table of Contents and in the Index.In short, there is no help!

    Are you even able to replicate the problem yet ?? It seems like its any easy thing to correct and I find it hard to believe you've let this go on for so long. At the moment you no longer provide any useable NW Documenation online - ie at all !!! 

    That's a pretty dramatic omission, IMHO. :-)


  •  05-15-2009, 11:09 AM 3926 in reply to 3904

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    Ok, I found the problem.... a picture says 1Kb, as they say ;-) ...

    The download site should carry a note that the file may need to be unblocked.

     


  •  05-15-2009, 11:23 AM 3927 in reply to 3926

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    Hi Ninny,

    We made a FAQ about this already:

    Q: Trouble accessing the CHM Help Files in Vista
    I downloaded the CHM version of your help files but none of the content displays - what is wrong?

    A: It sounds like you are using Windows Vista. Here's what to do:

    * Close the Help Viewer application.
    * Right click on the CHM file and click "Properties".
    * Click "Unblock" then OK.
    * Reload the file. It should then work.
     

    (http://nintexfaq.nintex.com/workflow/faq/index.asp?CATE=0#29)

     We have stated this in the past on connect as well, please see this post: http://connect.nintex.com/forums/thread/3769.aspx.

  •  05-15-2009, 11:56 AM 3929 in reply to 3927

    Re: Easy extension of Nintex Workflow calculation capabilities (using SQL or Web Services)

    There is also a note about unblocking the content in the forum post itself: http://connect.nintex.com/files/folders/nw_help/entry1549.aspx.
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems