My favorite new feature in Nintex Workflow 2010 are User Defined Actions (UDA). An UDA is a kind of workflow template which can be used like any other Nintex action. More technically spoken it is an composite activity. Comfortable is that you can design them in the same easy way as an usual Nintex workflow. A technically minded workflow designer can create domain UDAs, maybe to encapsulate web service calls to a SAP system. And later on the business users can use them in their workflows without any technical background knowledge. Time for an example…
The “Send Tweet” User Defined Action
In this example we will create a UDA for posting Twitter status updates. Imagine we are an social marketing aware company and want to give our marketing team the ability to send tweets from Nintex workflows. They should be able to design the workflows themselves (usually approval workflows) and should not care about technical details. Perfect scenario for an UDA.
Site Actions > Nintex Workflow 2010 > Manage UDAs
Start designing the UDA in the familiar Nintex WF designer
Define input and output parameters
Create an input parameter for the status update message (Message).
Drag an “Build dynamic string” action for building the URL and a “Web request” action for posting the update to the designer.
Configuration of the “Build Url…” action.
The result variable “Url” can be created directly the config dialog via the “Variables” menu item in the ribbon.
Configuration of the “Post…” action.
You only need to configure Url, Username & Password and that the POST verb should be used.
Tip: Instead of defining the user credentials inline you can use a Nintex workflow constant of type credentials. The advantage is that you can change the credentials without changing and republishing the UDA.
Configure UDA settings
The “Title” defines the display name of the action and the “Category” defines in which group it will be shown in the designer. Also nice is that you can define you own icons.
Publish the UDA
By default the UDA is scoped for the current team site, but you can promote it to the site collection or farm level. Additionally you can import and export UDAs.
Use the “Send tweet” action in a workflow
The “Send tweet” action is now available in the “Twitter” group on the workflow actions menu on the left. Now the marketing team could easily use it within an approval action.
Configuration of “Send Tweet”
The marketing team only have to provide the message for the Twitter status update and don’t care about any technical detail.
Start the workflow and approve the tweet.
You can easily encapsulate more Twitter API calls like this and build kind of a domain language. More ideas about Twitter and Nintex you can find on Markus Alt’s blog. Twitter is just a trivial example, you could also use this approach to design domain actions SAP or for any other system.