Hi,
I have created a web service client using C# and trying to excute workflow via SOAP.
If the workflow that I run failed in the orchestrator, how can I get the error message of the workflow run via SOAP?
Hi,
You should be able to use the WorkflowToken object and its xmlContent attribute.
Here you are a piece of Java code that you could adapt to your C# client:
Workflow wf = ... WorkflowToken token = vsoWebControl.executeWorkflow(wf.getId(), username, password, null); System.out.println(token.getGlobalState()); // probably "running" while ("running".equals(token.getGlobalState())) { System.out.println("waiting for workflow to finish..."); Thread.sleep(500, 0); // wait for half a second token = vsoWebControl.getWorkflowTokenForId(token.getId(), username, password); } System.out.println(token.getGlobalState()); // "failed" if there is an exception String content = token.getXmlContent(); System.out.println("content = " + content); // exception message should be there |
I hope it helps.
Regards,
Sergio
Thanks for help!
I try it out and it works.
Regards,
Karen