How to approve or reject SharePoint workflow using Nintex workflow

To approve or reject a SharePoint Workflow from a Nintex Workflow is very easy. There is a web service exposed from SharePoint which is Workflow.asmx, you can access it at

http:// server /_vti_bin/workflow.asmx

Now the method that we will be using to action our SharePoint workflow is AlterToDo. This method takes the following arguments:

  • Item (The URL location of an item on which a workflow is being run)
  • todoId (Unique identifier of the assigned task)
  • todoListId (Globally unique identifier (GUID) of the assigned task list containing the task)
  • taskData (Task data for conversion into a hash table)

Okay so back to Nintex now.

Step 1: Add a call web service workflow action and configure it.

Step 3: Add URL of workflow.asmx web service in the URL field, specify username and password and click refresh to update list of available methods in the Web Service

Step 3: Select SOAP Editor in editor mode, this is necessary as you will be adding some xml in TaskData parameter and select SOAP builder mode seems to html encode < > signs which results in error

Step 4: Specify item, todoId, todoListId and paste the following xml in tag.

<my:myFields xmlns:my=”; >






Your configuration should look something like this

Calling Workflow.asmx using Nintex workflows

Try some fixed values first for testing purposes and click run and then replace them.

I hope you find this post useful. Thanks for reading.


11 thoughts on “How to approve or reject SharePoint workflow using Nintex workflow

  1. hiee Khurram,
    I have an issue with Nintex, My workflows are hanging in the system. If the Workflow task is left for two days or more in Not Started state and then approved, it goes in “In Progress” for ever. Can you help me in this. What could be the reasons of this ?

    1. Hi Hammad,

      Thank you for commenting on my blog, Sure, I’ll will try my best to help you out. I saw the beautiful exception message you’ve posted on Nintex Connect :p. The following excerpt from your exception message seems interesting

      *Access Denied for /contoso/_layouts/IniWrkflIP.aspx?List={b713a4ad-747e-4980-ad1c-c420d3f588b7}&ID=1&TemplateID={3cf9d212-c83d-4486-9fce-ee8d00efacbc}&Source=blah

      *Check out this blog, it seems this guy had the same issue. I hope this will help you out. Keep me posted.

    1. Thanks for reading SV. If you have a task list associated with a workflow and want to update task associated with an instance then try this solution (, you will have to specify tag.

      If have you don’t have any workflow associated with a task list then you can try list.asmx webservice to update list items, check this out for more details (

      1. Thanks for the response Khurram.

        I tried the solution you have described above, but it did not make any change.
        There were no errors too.
        Here is what I did.
        String SiteUrl = SPContext.Current.Web.Url + “/”;
        WorkflowService.Workflow ws = new WorkflowService.Workflow();
        ws.Url = SiteUrl + “/_vti_bin/workflow.asmx”;
        ws.Credentials = CredentialCache.DefaultCredentials;

        StringBuilder xmlBuilder = new StringBuilder();
        xmlBuilder.AppendFormat(“”, “”);
        xmlBuilder.AppendFormat(“{0}”, user.Name);
        xmlBuilder.AppendFormat(“{0}”, user.LoginName);
        xmlBuilder.AppendFormat(“{0}”, “User”);
        xmlBuilder.AppendFormat(“{0}”, Description);
        xmlBuilder.AppendFormat(“2012-11-21 11:21:00”);
        xmlBuilder.AppendFormat(“{0}”, Status);
        XmlDocument doc = new XmlDocument();

        //XmlNode todosForItem = ws.GetTemplatesForItem(itemUrl);
        SPList tasksList = SPContext.Current.Web.Lists[GetConfigValueByKey(“AccessITTasks”)];

        XmlNode node = ws.AlterToDo(SiteUrl + itemUrl, taskItem.ID, new Guid(tasksList.ID.ToString()), doc.DocumentElement);

      2. SV, is your task list associated with any workflow? and are you planning to action this workflow via the web service or do you just have a task list and update the assigned to field via web service?

      3. I have a task list associated with a workflow which is assocaited to a content type. Yes, I will to reassign a task using web service.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s