GVNotificationNode

From GreenVulcano Wiki
Revision as of 11:34, 23 February 2012 by Anonymous (talk) (JMXNotification)
Jump to: navigation, search

GVNotificationNode element defines the nodes where GreenVulcano® ESB indicates a notification on execution of the workflow.

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
type fixed This attribute must assume the value flow-node.
op-type fixed This attribute must assume the value notification.
class fixed This attribute must assume the value it.greenvulcano.gvesb.core.flow.GVNotificationNode.
id required Uniquely identifies the notification node.

Not to be confused with the id of individual notifications.

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.
next-node-id required Indicates the next node in the workflow to execute when the operation ends.
point-x optional X position of the node in the VulCon workflows editor.

Immutable, used by VulCon®.

point-y optional Y position of the node in the VulCon workflows editor.

Immutable, used by VulCon®.

dump-in-out optional If true enable the dump of the input/output GVBuffer.

Default false.

dump-env-in-out optional If true enable the dump of the input/output Execution Environment.

Default false.

Might contain the following subelements:

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 This attribute 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 This attribute 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:

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 This attribute must assume the value it.greenvulcano.gvesb.notification.JMXNotification.
id required This attribute 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:

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:

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-object.
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:

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.