Invoke Web Service Action for Workflows
The Invoke Web Service action allows you to invoke a specified Web service. A Web service is a way to call code located on a different machine via HTTP.
Deltek recommends that the Invoke Custom Method action be used to execute custom code during a workflow whenever possible. The Invoke Web Service action should be used when calling a third party Web service, or when using Invoke Custom Method is not possible. (For example, the code needs to update a database that is not accessible from the Vision application server.)
When writing a Web service to be invoked via Workflow, it is crucial that there is no attempt to either read or update the data being updated in the Save operation that triggered the workflow. Doing so will cause the Web service’s database call to be blocked and will result in a database lock. The database call will then time out, and the Web service call will fail.
Reasons to Use Invoke Custom Method over Invoke Web Service
- As a developer, you do not need to hard code SQL connection strings; you always get access to the "current" Vision database.
- A lot less code is needed to get/retrieve data because the WorkflowBaseClass provides easy to use methods for this.
- An easy way is provided to send messages back to the user.
- If an error occurs, any changes you made to the Vision database will automatically be rolled back.
- You will have better performance because of having to avoid serialization/deserialization of data, as well as no need for the overhead of making an HTTP call.
Reasons to Use Invoke Web Service over Invoke Custom Method
- If you need to call a third-party Web service.
- If running custom code on the Vision application server is not possible because the code must reside at a different location.
More Information
For additional technical information, see the Deltek VisionXtend Web Services and APIs for Deltek Vision guide on the Customer Care Connect site.
For information on how to write and build Web services using ASP.NET, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconbuildingaspnetwebservices.asp.
For information on how to write and deploy Web services using ASP.NET and Visual Studio .NET see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskDeployingWebServices.asp.