Community

SendTask() giving an error "SOAP Server Application Faulted" Answered

Hi,

I am a user of Flexicapture 11 Distributed.

I am able to rename batchname by using function UpdateBatch(,);
But whenever I am trying to send a task to Verification stage using function SendTask() then it is giving an error "SOAP Server Application Faulted".
My code is as follows:
I want to get available tasks and want to re-send those tasks to Verification Stage by giving some comment to it,

FlexiCapture.Task[] Tasks = service.GetAvailableTasks(sessionId, project.Id, 500, false);
if (Tasks != null)
{
foreach (FlexiCapture.Task task in Tasks)
{
if (task.BatchName == "Batch HF_ID143832")
{
MessageBox.Show("Sending Task To verification");
string comment = "Task For John";
service.SendTask(sessionId, task.Id, 500, comment);
MessageBox.Show("Task sent Successfully");
}
}
}

Please let me know the possible solution for the same.

-Rahul

0

Comments

2 comments

  • Avatar
    Ekaterina

    Hello,

    Please note that the parameter stageId for SendTask() corresponds to the [ProcessingStage].[Id] column in the FC11 database, not to the StageType enumerator value (500 for Verification, as it's written in your sample). To get the correct stageId you'll need to find the stage having the required StageType among all available stages for the given batch type.

    0
  • Avatar
    Rahul

    Hi Ekaterina,

    Thanks, used the ID as per your suggestion, now it is working.
    Thanks once again.

    -Rahul

    0

Please sign in to leave a comment.