Invoke Custom Method Action for Workflows
The Invoke Custom Method action allows users to call a custom DLL. For example, you can use this action to modify your Vision database if it doesn't suit your company's needs. You can also use this action as a method of interacting with another outside application or system.
The Invoke Custom Method action is the recommended way to write custom code to be executed during a workflow. Whenever possible, this technique of extending workflows should be used in lieu of the Invoke Web Service action. It is also the recommended way to write custom code to be executed during auto numbering. Whenever possible, this technique of extending Auto Numbering should be used in lieu of the Web Service action.
To take full advantage of available functionality, the developer should inherit from WorkflowBaseClass—a class shipped with Vision in Deltek.Vision.WorkflowAPI.dll—that contains methods that allow the custom developer to participate in Vision’s transactions. Participating in Vision’s transactions is the only way to prevent database locks when reading or updating data involved in the Save that triggered the workflow. The QueryData and ExecuteSQL methods are available when inheriting from WorkflowBaseClass to provide a safe way to query and update data in the Vision database without having to worry about where the current Vision database is or managing connections.
You can create any number of methods within a single class. You can have as many classes as you want per project. You may create any number of projects; all you need to do is copy the resulting DLLs over to the Workflow directory.
Your methods may have any number of arguments. The arguments to your methods should be of simple data types (for example, strings or integers). Only a function can be used to generate an auto number and the Custom Method must return one value of type String. You cannot use a subroutine to create this value.
If you compile your project in debug mode, you may copy the PDB file created during the compile to the Workflow directory as well. In case of errors, the presence of the PDB file will mean that you will get more detailed error information, including line numbers in your stack trace.
For More Information
For additional technical information, see the Deltek VisionXtend Web Services and APIs for Deltek Vision guide on the Customer Care Connect site.