Nintex Workflow 2010: Adding a button to delegate a task in InfoPath

Document created by emily.billing@nintex.com Champion on Jul 16, 2014Last modified by emily.billing@nintex.com Champion on Jul 16, 2014
Version 3Show Document
  • View in full screen mode

This document describes how to add a button to delegate a task within an InfoPath form. It is a direct continuation of the example provided within the Nintex Workflow 2010 SDK (InfoPath integration).

 

Open an InfoPath form. Three additions were made to the form before adding the ‘DelegateTask’ data connection.

 

A button was added named Delegate, as well as a text field named ‘delegateuser’ and a yes/no boolean checkbox named ‘SendNotification’.

 

delegate.png

These can be added anywhere on the form design.

 

How configure a Delegate button

 

Add another SOAP Web Service data connection from the Data tab in the InfoPath Ribbon. Use the Nintex Workflow web service URL used previously (<site url>/_vti_bin/nintexworkflow/workflow.asmx).

 

Choose DelegateTask as the web service method.

data.png

In the parameters screen, set the value for taskListName to the name of the task list on the SharePoint site that the workflow will use.

parameters.png

Complete the wizard, and uncheck the Automatically retrieve data when form is opened option.

 

Open the rules for the delegate button. Add an action to set the 'spTaskId' query field of the 'DelegateTask' web service to the SharePointTaskId field of the first 'UserTask' node in the 'GetRunningWorkflowTasksForCurrentUser' data set.

rule.png

 

Add another action to set the 'targetUsername' query field of the 'DelegateTask' web service to the 'delegateuser’ field from the InfoPath form.

 

Please note: The ‘delegateuser’ field should contain the account name of the user to whom the task will be delegated.

rule.pngtarget.png

Add another action to set the 'comments' query field of the 'DelegateTask' web service to the value ‘delegate test’ (this can be altered in a real working scenario to a form field).

comments.pngAdd another action to set the 'sendNotification' query field of the 'DelegateTask' web service to the form Boolean field ‘sendnotification’.

send.png

Add another action to query the 'DelegateTask' data source.

Add a final action to close the form. The final rule set should look like the following:

final.png

Save and publish the form.

 

Please see the attached simple form which queries for the current task associated to the InfoPath form, and then allows the user to delegate the task via the Delegate button. This form contains a section that shows the details of the queried task as well as a button to perform the query. Data connections in this example will need to be edited to match the correct URL for your environment.

 

Attachments

Outcomes