Difference between revisions of "GVNotificationNode"

From GreenVulcano Wiki
Jump to: navigation, search
(Log4JNotification)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
GVNotificationNode element defines the nodes where {{GVESB}} indicates a notification on execution of the workflow.
+
=={{VULCON}}/{{GVCONSOLE}} Configuration==
 +
 
 +
GVNotificationNode element defines the nodes where {{GVESB}} 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).
 
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).
Line 12: Line 14:
 
{|class="gvtable"
 
{|class="gvtable"
 
! Attribute !! Type !! Description
 
! Attribute !! Type !! Description
|-
 
| type || fixed || This attribute must assume the value '''flow-node'''.
 
 
|-
 
|-
 
| op-type || fixed || This attribute must assume the value '''notification'''.
 
| op-type || fixed || This attribute must assume the value '''notification'''.
 
|-
 
|-
 
| class || fixed || This attribute must assume the value '''it.greenvulcano.gvesb.core.flow.GVNotificationNode'''.
 
| 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.
 
| on-critical-error || required || A notification can be defined as 'critical', which is vital for the proper execution of the workflow.
Line 30: Line 27:
 
|-
 
|-
 
| output || required || This parameter specifies the output buffer where to put a possible exception generated by a 'critical' notification.
 
| 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 {{L_VULCON}}.
 
|-
 
| point-y || optional || Y position of the node in the VulCon workflows editor.
 
Immutable, used by {{L_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:
 
Might contain the following subelements:
* Description
 
 
* [[#Log4JNotification|Log4JNotification]] or [[#JMXNotification|JMXNotification]]
 
* [[#Log4JNotification|Log4JNotification]] or [[#JMXNotification|JMXNotification]]
  
Line 95: Line 77:
 
* [[#ExceptionMessage|ExceptionMessage]]
 
* [[#ExceptionMessage|ExceptionMessage]]
 
* [[#GVBufferMessage|GVBufferMessage]]
 
* [[#GVBufferMessage|GVBufferMessage]]
 +
 +
====ExceptionMessage====
 +
 +
This element is the structure of a dynamic message for notifications of {{GVESB}} 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 [[placeholders|metadata]] will not be replaced.
 +
 +
The ExceptionMessage Element is used by: [[#JMXExcNotification|JMXExcNotification]], '''Log4JNotification'''.
 +
 +
====GVBufferMessage====
 +
 +
This element is the structure of a dynamic message for notifications of a {{GVESB}} 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 [[Placeholders|metadata]] are written in accordance with the above format.
 +
If an error occurs the [[Placeholders|metadata]] will not be replaced.
 +
 +
The GVBufferMessage Element is used by: [[#JMXGVBufferNotification|JMXGVBufferNotification]] and '''Log4JNotification'''.
  
 
===JMXNotification===
 
===JMXNotification===
Line 139: Line 157:
 
* [[#JMXDefaultNotification|JMXDefaultNotification]]
 
* [[#JMXDefaultNotification|JMXDefaultNotification]]
 
* [[#StaticMessage|StaticMessage]]
 
* [[#StaticMessage|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:
 +
{|class="gvtable"
 +
! 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|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:
 +
{|class="gvtable"
 +
! 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:
 +
* Description
 +
* [[#GVBufferMessage|GVBufferMessage]]
 +
 +
====JMXDefaultNotification====
 +
 +
This element defines the standard JMX notification object javax.management.Notification.
 +
 +
The JMXDefaultNotification Element is used by: [[#JMXNotification|JMXNotification]].
  
 
====StaticMessage====
 
====StaticMessage====
Line 147: Line 211:
  
 
It is used by notification in the following cases:  
 
It is used by notification in the following cases:  
* Have not been configured specific GVBufferMessage or ExceptionMessage messages  
+
* Have not been configured specific [[#GVBufferMessage|GVBufferMessage]] or [[#ExceptionMessage|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  
+
* A message that has been configured does not match the input ES: You have configured a [[#GVBufferMessage|GVBufferMessage]], but received an item of type Exception  
 
* It has not been received any input.
 
* It has not been received any input.
  
 
The StaticMessage Element is used by: [[#JMXNotification|JMXNotification]] and [[#Log4JNotification|Log4JNotification]].
 
The StaticMessage Element is used by: [[#JMXNotification|JMXNotification]] and [[#Log4JNotification|Log4JNotification]].

Latest revision as of 14:58, 4 March 2013

VulCon/GV Console Configuration

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

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:

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.