0
Answered

How do I get Warewolf into my C# application?

Anonymous 4 years ago • updated by anonymous 4 years ago 0

Answer

Answer
Answered
You need to use it at your service layer. All Workflows are hosted as web services that can return XML or JSON data.

For example you have a workflow called MyWorkflow you want to invoke from C#. You need to use a WebRequest to invoke the Warewolf service via a URL like http://localhost:3142/services/MyWorkflow.xml

You can then take the response data and parse the XML into an object. 
Or you could change the extension from .xml to .json like http://localhost:3142/services/MyWorkflow.json
This will cause the service to return JSON data you can convert to POCO object with a JSON libary like the one here http://james.newtonking.com/json
you can then use this POCO in your C# application. 

Answer
Answered
You need to use it at your service layer. All Workflows are hosted as web services that can return XML or JSON data.

For example you have a workflow called MyWorkflow you want to invoke from C#. You need to use a WebRequest to invoke the Warewolf service via a URL like http://localhost:3142/services/MyWorkflow.xml

You can then take the response data and parse the XML into an object. 
Or you could change the extension from .xml to .json like http://localhost:3142/services/MyWorkflow.json
This will cause the service to return JSON data you can convert to POCO object with a JSON libary like the one here http://james.newtonking.com/json
you can then use this POCO in your C# application.