BP Fault Log Adapter

The BP Fault Log adapter logs business process error messages, sets a logging level, includes the document body in the logged message, or causes a failure in the business process.

The following table provides an overview of the BP Fault Log adapter:

System name BPFaultLog
Graphical Process Modeler (GPM) categories All Services, System
Description Provides control over business process error message logging and recovery.
Business usage The following options are available with the BP Fault Log adapter:
  • Logging business process error messages
  • Setting a logging level – DEBUG, INFO, WARN, and ERROR
  • Including the document body in the logged message
  • Causing a failure in the business process
Usage example The BP Fault Log adapter logs business process error messages and assigns log levels to various types of messages. Specifying a log level helps categorize and prioritize the generated logs. You may find it useful to configure the BP Fault Log adapter to fail a business process if a service introduces invalid data, and to log a message indicating the source of the bad data. This feature can save you time and help you identify problems within your business process so you can correct them. Specify a location on disk to send and view generated business process error message logs.
Preconfigured? No
Requires third party files? Text editor (such as Microsoft WordPad) to view the logs.
Platform availability All supported platforms
Related services None
Application requirements Designate a location on disk to send and view logs.
Initiates business processes? No
Invocation Runs as part of a business process.
Business process context considerations When set to fail on error, it will set the WFC status to ERROR.
Returned status values Success , Error
Restrictions None
Persistence level None
Testing considerations The BP Fault Log adapter uses system defaults to terminate logger lines.

How the BP Fault Log Adapter Works

The BP Fault Log adapter logs business process error messages and assigns log levels to various types of messages. Specifying a log level helps categorize and prioritize the generated logs. You may find it useful to configure the BP Fault Log adapter to fail a business process if a service introduces invalid data, and to log a message indicating the source of the bad data. This feature can save you time and help you identify problems within your business process so you can correct them. Specify a location on disk to send and view generated business process error message logs.

Note: The BP Fault Log adapter terminates logger lines with 0A (linefeed). Use a text editor (for example, Microsoft WordPad) to view the log file.

Implementing the BP Fault Log Adapter

To implement the BP Fault Log adapter, complete the following tasks:
  1. Create a BP Fault Log adapter configuration. For information, see Creating a Service Configuration.
  2. Configure the BP Fault Log adapter.
  3. Use the B2B Fault Log adapter in a business process.

Configuring the BP Fault Log Adapter

To configure the BP Fault Log adapter, you must specify field settings in Sterling B2B Integrator and in the GPM.

Sterling B2B Integrator Configuration

The following table describes the fields used to configure the BP Fault Log adapter in Sterling B2B Integrator:

Note: The field names in parentheses represent the corresponding field names in the GPM. This information is provided for your reference.
Field Description
Name Unique and meaningful name for the adapter configuration. Required.
Description Meaningful description for the adapter configuration, for reference purposes. Required.
Select a group Select one of the three options available for service groups:
  • None – this service will not be part of a service group.
  • Create New Group – to create a new service group for this service type, enter a unique name.
  • Select Group – select an existing service group for this service type from the list.
Logger Name(loggerName) Name of the log. Required. The file created in the Logger Output Path is given this name and an extension of .log.
Logger Output Path(loggerPath) Path used to write the log to a file. Required. Valid value is a valid full path.
Include Document Body(includeBody) Whether to include the body of the data with the error message. Required. Valid values are:
  • True – Include the error message and the body of the data.
  • False – Include the error message only.
Logging Type Select type of log. Required. Valid values are Normal and Rolling.

GPM Configuration

The following table describes the fields used to configure the BP Fault Log adapter in the GPM:

Field Description
Config Name of the adapter configuration.
fail-on-error Whether to cause the business process to fail if an error is logged. Optional. Valid values are Y and N. If the parameter is set to Yes, and the log-level (see next field description) is set to ERROR, the business process status is set to Error and the business process advanced status is set to the value in the log-message. This enables you to force a business process to fail (based on invalid business process data), when it may have ordinarily succeeded.
log-level Type of log. Required. Values are:
  • DEBUG – An error message for internal use
  • INFO – Who the error message was sent to
  • WARN – A significant error in the business process
  • ERROR – A general error in the business process
Note: You can add custom log levels to this list in the GPM, or by editing a business process in the business process editor.
log-message Message that you want to send to the log. Required.
maxLogSize Maximum log size for rolling in bytes. Required if you selected Rolling as the log type in the service configuration. Valid value is a number greater than zero.