Notification

Description


It allows a notification to signal on the process flow.For each ‘NotificationNode’ is associated with a list of notifications (Notification) that handle the type of message to send and the medium on which to write the notification.

ES: log4j, JMX. The order in which notifications are performed is the insertion order.
A notification can be described as ‘critical’, which is vital for the proper execution of the flow. If a notification ‘critical’ throws an exception, the flow fails, and the exception is inserted into the buffer specified by the ‘output’ of NotificationNode.
The NotificationNode not read an input buffer, as may be specified a different one for each notification.

Developer Studio (VulCon)/GV Console Configuration


Node GVCore element Description
Notification GVNotificationNode Indicates a notification on execution of the workflow.

GVNotificationNode element defines the nodes where GreenVulcano® ESB indicates a notification on execution of the workflow, is a Flow element that extends FlowNode.

Each GVNotificationNode has an associated list of notifications (Notification) that manage the type of message to send and the technology used to make the notification (Log4J, JMX).
The order in which notifications are made is that in which they are defined.

A notification can be defined as ‘critical’, which is vital for the proper execution of the workflow.
If a notification ‘critical’ throws an exception, the flow fails and the exception is inserted into the buffer specified by the attribute ‘output’ of GVNotificationNode.

The GVNotificationNode does not read an input buffer, as may be specified a different one for each notification.
The following table shows the GVNotificationNode element’s attributes:

Attribute Type Description
op-type fixed This attribute must assume the value notification.
class fixed This attribute must assume the value it.greenvulcano.gvesb.core.flow.GVNotificationNode.
on-critical-error required A notification can be defined as 'critical', which is vital for the proper execution of the workflow.The parameter 'on-critical-error' is used to decide whether to stop or not the notifications sequence in the occurrence of exception for a notification defined 'critical' The attribute's admitted values are:
  • break
  • continue
output required This parameter specifies the output buffer where to put a possible exception generated by a 'critical' notification.

Might contain the following subelements:

  • Log4JNotification or JMXNotification

Log4JNotification


This element represents GreenVulcano® ESB notifications using Log4j.
Each element of notification have sub-elements that define the message:

  • StaticMessage: A static message that does not provide dynamic parameters and can be associated to any notification
  • GVBufferMessage: Defines a notification relating to a GVBuffer found in the execution environment.
  • ExceptionMessage: Defines a notification relating to an Exception found in the execution environment.

The following table shows the Log4JNotification element’s attributes:

Attribute Type Description
type fixed Thisattribute must assume the value notification-node.
class fixed This attribute must assume the value it.greenvulcano.gvesb.notification.Log4JNotification.
id required This attribute defines the id (unique) of the notification.
logger required This attribute defines the logger used to write the notification.
level required This attribute defines the trace level.
The attribute's admitted values are:
  • INFO
  • DEBUG
  • WARN
  • ERROR
  • FATAL
critical required This attribute defines whether or not the notification is critical for the flow.
If a notification 'critical' throws an exception, the flow fails, and the exception is included in the buffer specified by the parameter 'output' of NotificationNode. The attribute's admitted values are:
  • yes
  • no
input optional Thisattribute defines the input buffer, from which read data for notifications execution.
A different buffer can be specified for each notification.

Might contain the following sub-elements:

  • Description
  • StaticMessage
  • ExceptionMessage
  • GVBufferMessage

ExceptionMessage


This element is the structure of a dynamic message for notifications of GreenVulcano® ESB errors.
An ExceptionMessage provides the parameters to be valued at runtime. These parameters are always written in ${param} format.
The possible parameters for an Exception object are:

  • ${message}
  • ${cause}
  • ${errorCode} (only for exception of type GVException)
  • ${stackTrace}

All metadata are written in accordance with the above format. If an error occurs the metadata will not be replaced.
The ExceptionMessage Element is used by: JMXExcNotification, Log4JNotification.

GVBufferMessage


This element is the structure of a dynamic message for notifications of a GreenVulcano® ESB flow without error.
A GVBufferMessage provides the parameters to be valued at runtime. These parameters are always written in ${param} format.
The possible parameters for a GVBuffer object are: for standard fields, the field name

  • ${system}
  • ${service}
  • ${id}
  • ${retCode}

For properties:

  • ${property[‘PROP_NAME’]}
  • ${properties} (return all the properties, in the form name: ‘fieldName’ value: ‘fieldValue’)

All metadata are written in accordance with the above format. If an error occurs the metadata will not be replaced.
The GVBufferMessage Element is used by: JMXGVBufferNotification and Log4JNotification.

JMXNotification


This element represents the GreenVulcano® ESB Notificaions using JMX.
Each Notification element has sub-elements that define the message:

  • StaticMessage: A static message that does not provide dynamic parameters and can be associated to any notification
  • JMXGVBufferNotification: Defines a notification relating to a GVBuffer found in the execution environment.
  • JMXExcNotification: Defines a notification relating to an Exception found in the execution environment.

The following table shows the JMXNotification element’s attributes:

Attribute Type Description
type fixed This attribute must assume the value notification-node.
class fixed Thisattribute must assume the value it.greenvulcano.gvesb.notification.JMXNotification.
id required Thisattribute defines the id (unique) of the notification.
critical required This attribute defines whether or not the notification is critical for the flow.
If a notification 'critical' throws an exception, the flow fails, and the exception is included in the buffer specified by the parameter 'output' of NotificationNode. The attribute's admitted values are:
  • yes
  • no
objectName required This attribute defines the objectName the notification broadcaster.
notificationType required This attribute defines the notification type
input optional This attribute defines the input buffer, from which read data for notifications execution.
A different buffer can be specified for each notification.
mainInput optional This attribute defines the input buffer, from which read data for notifications execution when the "input" buffer doesn't contain a GVBuffer.
A different buffer can be specified for each notification.

Might contain the following sub-elements:

  • Description
  • JMXExcNotification
  • JMXGVBufferNotification
  • JMXDefaultNotification
  • StaticMessage

JMXExcNotification


This element defines a notification object that extends the standard JMX Notification including the Throwable object.
The JMXExcNotification Element is used by: JMXNotification.
The following table show the element’s attributes JMXExcNotification:

Attribute Type Description
type fixed This attribute must assume the value notification-object.
class fixed This attribute must assume the value it.greenvulcano.gvesb.notification.JMXExcNotification.

Might contain the following elements:

  • Description
  • ExceptionMessage

JMXGVBufferNotification


This element defines a notification object that extends the standard JMX Notification including the GVBuffer object.
The following table shows the JMXGVBufferNotification element’s attributes:

Attribute Type Description
type fixed This attribute must assume the value notification-node.
class fixed This attribute must assume the value it.greenvulcano.gvesb.notification.JMXGVBufferNotification.
dataValue required This attribute specifies whether to send the value of the body field in a notification or not.
The attribute's admitted values are:
  • yes
  • no

Might contain the following sub-elements:

  • Description
  • GVBufferMessage

JMXDefaultNotification


This element defines the standard JMX notification object javax.management.Notification. The JMXDefaultNotification Element is used by: JMXNotification.

StaticMessage


This element is the structure of a static message for notification.
A StaticMessage does not provide parameters to evaluate dynamically.
It is used by notification in the following cases:

  • Have not been configured specific GVBufferMessage or ExceptionMessage messages
  • A message that has been configured does not match the input ES: You have configured a GVBufferMessage, but received an item of type Exception
  • It has not been received any input.
    The StaticMessage Element is used by: JMXNotification and Log4JNotification.