Question

Nintex Workflow Task Approval || Workflow Outcome not updating

  • 21 January 2023
  • 3 replies
  • 192 views

Badge +1

We have create a Nintex Workflow with Assign a Flexi Task action with SharePoint 2019 (On-Prem).

Based on requirements we need to approve task programmatically and we are performing update in Workflow task list which is working fine except for (01) Column which Workflow Outcome.

 

Nintex Workflow Task List

 

Below is the code for updating task list:

 


3 replies

Userlevel 6
Badge +16

Hi @Taha Zubair 

I suggest the following

  • List down all the fields for an uncompleted Task. eg Status=”Not Started”, PercentCompleted=”0”, etc
  • Completed the Task normally. 
  • List down all the fields for this completed Task. 

I’m using SPO (so some fields might differ to your SP 2019 fields)

The uncompleted Task Form

After programmatically updating the Task Item

Viewing in the Workflow Task List

 

Badge +1

Hi Garrett Rookie.

 

Thank you very much for your response.

 

Actually we don’t have Nintex Task Outcome3 Filed instead we have only Outcome.

 

But I found a way around by approving the task using Soap services as below:

 

      var webSvc = siteURL + "/_vti_bin/NintexWorkflow/Workflow.asmx";

      var rqst = '<?xml version="1.0" encoding="utf-8"?>';

      rqst += '<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:m="http://nintex.com">';

      rqst += '<soap:Header>';

      rqst += '</soap:Header>';

      rqst += '<soap:Body>';

      rqst += '<m:ProcessFlexiTaskResponse2>';

      rqst += '<m:comments>' + varComments + '</m:comments>';

      rqst += '<m:outcome>' + varOutcome + '</m:outcome>';

      rqst += '<m:spTaskId>' + varTaskId + '</m:spTaskId>';

      rqst += '<m:taskListName>' + varTaskListName + '</m:taskListName>';

      rqst += '</m:ProcessFlexiTaskResponse2>';

      rqst += '</soap:Body>';

      rqst += '</soap:Envelope>';

      

      $.ajax({

        type: "POST",

        url: webSvc,

        contentType: "text/xml;charset=UTF-8",

        data: rqst,

        dataType: "xml",

        success: function (data, status, xhr) {         

          console.log('OK: ' + status);

        },

        error: function (data) { 

        console.log(data.responseText); 

        }

      });

 

Thanks,
Taha Zubair

Userlevel 6
Badge +16

Great job @Taha Zubair 

 

Reply