API reference GetTask() and SendTask() is not work

  • 22 Views
  • Last Post 3 weeks ago
Ivan posted this 4 weeks ago

Hi all,

I had referred the following topics from forum.

http://www.capturedocs.com/thread/sendtask-giving-an-error-soap-server-application-faulted/?order=all#comment-ece2ec7c-469e-4e2a-b084-a78d00887216

http://www.capturedocs.com/thread/4448-could-we-integrate-the-verification-process-in-the-external-station/?order=all#comment-a96f4c70-71ca-44c5-b39e-a6ba00d83e1e

Below is my part of code

/////////////////////////////////////////////////////////////////////////////////////////////

FC11Ver3.FlexiCaptureWebServiceApiVersion3 service = new FC11Ver3.FlexiCaptureWebServiceApiVersion3();

            service.Url = string.Format("http://{0}/FlexiCapture11/Server/WebServices.dll?Handler=Version3", serverUrl);

            service.Credentials = new System.Net.NetworkCredential(userName, password);

            int roleType = 12; // User station operator role

            int stationType = 10; // User station

            int sessionId = service.OpenSession(roleType, stationType); //I also try with (6,3)

            int userId = service.FindUser(userName);

 

////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I can AddNewImage and processBatch correctly. Besides, I can get BatchId and DocumentId too.

But there are two method can't work.

1.

In the GetBatchPercentCompleted while loop, no matter what I change the parameters, the getTask() always return 0(In task tab of admin console I can see the real taskID).

int taskId = service.GetTask(sessionId, projectId, 500, false, false); //I also change 500 to 100,200,1000 and so on.

2.

I also try two methods, but only CreateTask worked

service.CreateTask(sessionId, 5688, 2, "TEST", 0, docids.ToArray(), false);//worked, 5688 is the number in DB processingStage.ID

service.SendTask(sessionId, 963719, 5670, "TEST"); //no effect, 963761 is the another exist taskID waiting in verification stage, but I want to send it to 5670 exception stage by web service.

Order By: Standard | Newest | Votes
Ekaterina posted this 4 weeks ago

Hello,

Do you perform OpenTask() call prior to trying any other actions with an existing task?

http://help.abbyy.com/en-us/flexicapture/12/developer/opentask

Ivan posted this 3 weeks ago

Hi Ekaterina,

It seems OpenTask() need to pass the parameter taskId, but I can't get the correct taskId in issue#1.

It may related to issue#2 only, I will try use OpenTask() before SendTask() after I can get taskId in advance.

Close