Invoke Custom Method Overview

This workflow action requires knowledge about Web servers and/or the development of a Microsoft .NET assembly. If you do not have development experience, please contact the Deltek Customer Care group for assistance. This group provides help on a time and materials basis.

This alert action is only available for a user-initiated workflow.

The Invoke Custom Method action allows you to call a custom DLL and Create an Invoke Custom Method action for a workflow.

For example, you can use this action to modify your PM Compass 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.

In addition, you can extend the existing Cobra Web Service calls using this method. The Invoke Web Services action is not intended for web services that require a login. Since the Cobra Web Services require a login, a sample process named Calculate Progress is included in the default database. For details, see Modify Invoke Custom Method to Call Cobra Web Services.

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 Workflow should be used in lieu of the Invoke Web Service action.

To take full advantage of available functionality, the developer should inherit from WorkflowBaseClass – a class shipped with PM Compass in Deltek.PMCompass.WorkflowAPI.dll – that contains methods that allow the custom developer to participate in PM Compass' transactions. Participating in PM Compass’ transaction 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 PM Compass database without having to worry about where the current PM Compass database is or managing connections.

To create a custom DLL: 

  1. Create a Class Library project in Visual Studio.NET.

  2. Add reference to Deltek.PMCompass.WorkflowAPI.dll and Deltek.PMCompass.Ancestors.dll located in the Web\bin directory under the PM Compass install directory.

  3. Create a new class and inherit from WorkflowBaseClass.

  4. Create any method(s) you need.

  5. Compile your project.

  6. Place resulting DLL in a directory called Workflow under the PM Compass install directory (create one if not there).

You may create any number of methods in a single class, and 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).

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 you will get more detailed error information, including line numbers in your stack trace.

When you select this action, PM Compass displays the Invoke Custom Method Configuration dialog box.

What do you want to do?

Create an Invoke Custom Method action for a workflow

Complete the process when a workflow fails

Modify Invoke Custom Method to Call Cobra Web Services


Learn more about...