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.
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.
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.
Learn more about our Process Automation & IT, QA Services or Software Development products and solutions on the Web! Visit us at: Innovative Process Solutions