cancel
Showing results for 
Search instead for 
Did you mean: 
murphybp2
Nintex Newbie

What is the ProcessFlexiTaskResponse web service suppossed to do?

Jump to solution

I have a scenario where I need to cancel an outstanding workflow flexitask.  Since it doesn't have an action ID, I can't use the Complete Workflow Task action.  From some things I read on the old site, it looked like I needed to use the ProcessFlexiTaskResponse web service.  So I have a workflow that get's the ID for the task I need to cancel, then calls the ProcessFlexiTaskResponse web service.  Everything complete successfully, however the task is not updated or changed in anyway.  I'm assuming the web service will complete the task using the criteria I've input, but maybe that's not what it does.  Anyone have any experience using this web service? 

 

ProcessFlexiTaskResponse.png 

Labels: (1)
Reply
20 Replies
Highlighted
andrewg
Nintex Newbie

Re: What is the ProcessFlexiTaskResponse web service suppossed to do?

Jump to solution

It looks like you are using SP 2010. I found in the Nintex Workflow 2010 SDK that ProcessFlexiTaskResponse was: OBSOLETE. Use ProcessFlexiTaskResponse2 instead. And that the ProcessFlexiTaskResponse2 method is to: Registers a response to a workflow Flexi task.

 

So I would just switch to using the ProcessFlexiTaskResponse2 and see what that does.

 

More from the SDK:

 

Parameters

comments
Type: System..::..String
Any comments to record against the task response.
outcome
Type: System..::..String
The response for the task. Use GetOutcomesForFlexiTask to discover the allowed responses.
spTaskId
Type: System..::..Int32
The list item id of the task.
taskListName
Type: System..::..String
The name of the task list that contains the task.

 

Return Value

Success: The response was submitted correctly. CannotObtainLock: The task is locked by another operation so the response could not be submitted. For this result, it is good to inform the user to retry in a moment. InvalidUser: The user responding to the task is invalid.

Reply
andrewg
Nintex Newbie

Re: What is the ProcessFlexiTaskResponse web service suppossed to do?

Jump to solution

Also found a link to a blog on an example use case of ProcessFlexiTaskResponse2  Clubbing InfoPath Form & Nintex Approval Form | My Learnings

0 Kudos
Reply
Not applicable

Re: What is the ProcessFlexiTaskResponse web service suppossed to do?

Jump to solution

I have created one form almost like Clubbing InfoPath Form & Nintex Approval Form | My Learnings . But unfortunately its returning "Invalid User". Do you have any solution for this. My code is given below. Infopath webform,

code written in submit button.

============================================================================

            Dim root As XPathNavigator = MainDataSource.CreateNavigator()

            Dim CurrentTaskID As String = root.SelectSingleNode("/my:myFields/my:Current_Task_ID", NamespaceManager).Value

            Dim TaskListGUID As String = root.SelectSingleNode("/my:myFields/my:TaskListGuid", NamespaceManager).Value

            Dim wsc As WebServiceConnection = DirectCast(Me.DataConnections("ProcessFlexiTaskResponse2"), WebServiceConnection)

            ' Create XmlDocuments.

            Dim inputDocument As XmlDocument = New XmlDocument()

            Dim outputDocument As XmlDocument = New XmlDocument()

            Dim errorsDocument As XmlDocument = New XmlDocument()

            ' Load input document.

            inputDocument.LoadXml("<ProcessFlexiTaskResponse2 xmlns='http://nintex.com'><comments>Updated From Code Behind</comments><outcome>Approve</outcome><spTaskId>" & CurrentTaskID & "</spTaskId><taskListName>Tasks</taskListName></ProcessFlexiTaskResponse2>")

            ' Create XPathNavigator objects for documents.

            Dim inputNav As XPathNavigator = inputDocument.CreateNavigator()

            Dim outputNav As XPathNavigator = outputDocument.CreateNavigator()

            Dim errorsNav As XPathNavigator = errorsDocument.CreateNavigator()

          

            wsc.Execute(inputNav, outputNav, errorsNav)

           strTemp = outputNav.ToString & "---:" & User.UserName

            root.SelectSingleNode("/my:myFields/my:ApprovalStatusContainer/my:txtErrorMessage", NamespaceManager).SetValue(strTemp).

============================================================================

outputNav.ToString returns "Invalid User" . Please come up with a solution for thiese.

0 Kudos
Reply
murphybp2
Nintex Newbie

Re: What is the ProcessFlexiTaskResponse web service suppossed to do?

Jump to solution

That's good to know.  So I switched it to ProcessFlexiTaskResponse2 and ran it, but again nothing seems to happen.  I have workflow A which has created a Flexi Task that is waiting for a response.  I want to run workflow B that will cancel the outstanding Flexi Task.  When I run workflow B, it completes successfully, but the outstanding task hasn't changed, and workflow A is still waiting for a response.  Maybe I'm approaching this wrong.

0 Kudos
Reply
andrewg
Nintex Newbie

Re: What is the ProcessFlexiTaskResponse web service suppossed to do?

Jump to solution

Do you store the Return Value of the call? What was the outcome?

0 Kudos
Reply
Not applicable

Re: What is the ProcessFlexiTaskResponse web service suppossed to do?

Jump to solution

Any help to me ?

0 Kudos
Reply
murphybp2
Nintex Newbie

Re: What is the ProcessFlexiTaskResponse web service suppossed to do?

Jump to solution

I'm getting "Invalid User" for the results. Looks like same issue as Ziad Alhasawi‌. 

0 Kudos
Reply
andrewg
Nintex Newbie

Re: What is the ProcessFlexiTaskResponse web service suppossed to do?

Jump to solution

I'd imagine that you would receive that response when the user making the call is not the user that is assigned to the task. Could this be true in either of your cases?

Reply
murphybp2
Nintex Newbie

Re: What is the ProcessFlexiTaskResponse web service suppossed to do?

Jump to solution

I changed the credentials in the web service call to use my own, and I got back a success message. So if that’s the case that complicates things as the tasks I’ll want to cancel will be assigned to all sort of people. So do I need to first reassign it to whatever ID is going to run the web service?

0 Kudos
Reply