You are viewing limited content. For full access, please sign in.

Question

Question

How to get output parameter value from a web services call to workflow

asked on August 20, 2018

I have a C# project in .net to create a web services call to Workflow.

I can successfully add my input parameters from my code and make a web services call to my workflow with no problem according to the White Paper document - Workflow 9.0: Consuming the Workflow Web Service.

 

BUT the white paper didn't tell how to get the output parameters send from Workflow.

Can anyone can provide me a simple code to get the output parameters in C#?

The purpose to get the output parameters: "result" is ensure  the workflow runs complete successfully without error  and send back a parameter "result" to my C# program with result=0 (success); result=1 (fail).

 

Should you have alternative solution, please suggest!! 

 

Thank you so much.

workflow parameters.jpg
code01.jpg
code01.jpg (342.98 KB)
0 0

Replies

replied on August 20, 2018 Show version history

Unless I'm mistaken, I believe the web service calls to Workflow are only meant to initiate a workflow instance and any response relates only to the initiation request, not the completed process.

This makes sense considering the time it takes for a workflow to complete could vary dramatically (we have some that run for hours) and you don't want your web service call to have an infinite timeout.

A better option may be to set up your application to receive a callback and put a Web Request activity in Workflow that notifies your application and sends the data you want back when it is complete.

If you put Try-Catch activities into your workflow(s) you can catch any errors it encounters, and still send the results back to your application.

If you don't have your application configured to receive API calls, then another option would be to have workflow write the results back to a database that the application monitors.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.