Blog Posts Process Management

Error handling in cDevWorkflow

error handling oops

BPM Workflow Error Handling in cDevWorkflow

As with any software, error handling and information message handling can be very helpful.  cDevWorkflow provides error and information message handling in several areas of the application.

 

These messages are stored in cDevWorkflow’s message log which can be accessed through the “Status” menu item.

Error Handling View LogError Handling Messages

 

The above UI will render last 10 messages by default. Using the “View Log By” drop down, error handling and information messages can be viewed for various date ranges.  The message header includes priority, date created, error source and the message. Clicking on a message row will expand its details.

Error Handling View Log

The detail view shows includes the Workflow UserID, object type Reference Name, the object Reference ID, and a full stack trace for the error. Information messages display in a similar way. With administrative privileges, users also have the ability to clear the log.

API Error messaging

All API calls to cDevWorkflow are able to return the last error from the API. With any of the API objects, use the “errorMsg” property to get the last generated error message.

public string errorMsg;
deDesign oDE = new deDesign(“connectionString”, “userID”, null);
string sError = oDE.errorMsg;

Using the API to log messages

The API can be used for logging error and information messages to the cDevWorkflow’s log. Before making the API call, an error provider object must be created. Since cDevWorkflow provides the ability to define and use custom error providers, let’s use the default error provider that logs messages to the cDevWorkflow’s log database table.
clsDBErrorProvider oErrProvider = new clsDBErrorProvider(“connectionString”);

deDesign oDE = new deDesign(“connectionString”, “userID”, oErrProvider);

modGlobal.writeError(oErrorProvider, “source”, “message”, “stackTrace”, priorityLevel);

 

It’s also possible to use the direct methods of the error provider to log errors and messages.

 

Implementing Your Own Error Provider For cDevWorkflow

cDevWorkflow provides the ability to use your own custom error provider. By implementing a simple interface (IErrorProvider) and passing the error provider object to cDevWorkflow’s API calls, the custom error provider will be used for error and message logging within cDevWorkflow.

cDevWorkflow Engine errors

The cDevWorkflow engine service uses Windows event logging to log any error handling messages related to the service execution. For example, the cDevWorkflow service may not start due to invalid licensing or database connection issues. These messages are logged directly to the Windows Application log.

You may also be interested in reading more on the subject of Configuring a Custom Workflow Step.

A small sampling of the Workflow Technology for BPM Solutions contained within our cDevWorkflow product offering can be found here: Workflow Technology That Works.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/error-handling-in-cdevworkflow/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×