Nintex Workflows 2013 Approve Task Programmatically in c#


Badge +2

Hello all,

Currently i'm using SharePoint 2013 with Nintex Workflow 2013.

For Approval Page, i'm using aspx page (application page).

Do you guys know how to approve task from c# behind code using Nintex Workflow 2013 SDK ?

Btw, i got this reference like belows :

int decision = 0;
string comments = "";

Guid commentsFieldId = Nintex.Workflow.Common.NWSharePointObjects.FieldComments;
Guid decisionFieldId = Nintex.Workflow.Common.NWSharePointObjects.FieldDecision;
spTask[decisionFieldId] = decision;
spTask[commentsFieldId] = comments;

spTask.Update();

This above code requires Nintex.Workflow.dll.

I've already search in nintex directory and got no clue.

Does anyone have any workaround about how to apply that codes ?


3 replies

Badge +9

Hi,

Can you try this Nintex Approve/Reject Task, Flexi Task from code - Blog

Thanks,

Badge +2

hello.. thanks for your response.

i've tried and still not working, because that code only update workflow task list item and workflow action not moving.

So, the current approver didn't changed..

Badge +11

Nintex offers a webservice that provides methods for processing tasks. Maybe that could be an option for you? You will find a complete reference online, for example: http://help.nintex.com/en-US/sdks/SDK2013/#Reference/SOAP/NW_REF_SOAP_ProcessFlexiTaskResponse2.htm%3FTocPath%3DNintex%2… 

No need for Nintex DLLs either wink.png

Regards

Philipp

Reply