Home | Table of Contents | MonitorGraph | CloverETL 4.6.1
--- | --- | ---
Prev | Job Control | Next

## MonitorGraph

# Jobflow Component

Short Description
Ports
Metadata
MonitorGraph Attributes
Details
See also

### Short Description

MonitorGraph allows watching of running graphs. Component can either wait for final execution status or periodically monitor current execution status.

| Note
To be able to use this component, you need a separate jobflow license. Also, the component requires your project is executed on CloverETL Server.

Component | Same input metadata | Sorted inputs | Inputs | Outputs | Each to all outputs | Java | CTL | Auto-propagated metadata
--- | --- | --- | --- | --- | --- | --- | --- | ---
MonitorGraph |  |  | 0-1 | 0-2 |  |  |  |

### Icon

### Ports

Port type | Number | Required | Description | Metadata
--- | --- | --- | --- | ---
Input | 0 |  | Input tokens with identification of monitored graph. | Any
Output | 0 |  | Execution information for successful graphs. | Any
1 |  | Execution information for unsuccessful graphs. | Any

### Metadata

MonitorGraph does not propagate metadata from left to right or from right to left.

This component has metadata templates. The templates are described in Details. See general details on Metadata Templates.

### MonitorGraph Attributes

Attribute | Req | Description | Possible values
--- | --- | --- | ---
Basic
Graph URL | no | Path to a graph which represents typical monitored graph. The graph referenced by this attribute is also used for all mapping dialogs - they display dictionary entries and tracking information based on this graph. |
Timeout | no | Maximal amount of time dedicated for graph run; by default in milliseconds, but other time units may be used. If the graph is running longer than the time specified in this attribute, current graph information with TIMEOUT status is send to error output port. This is just default value for all graph monitors. Can be overridden in input mapping individually for each graph monitor. | 0 (unlimited) | positive number
Monitoring interval | no | Whenever time specified in this attribute elapses, the graph monitor send actual graph status information to the first output port. The interval is in milliseconds by default, but other time units may be used. By default, only final graph results are sent to output ports. This is just default value for all graph monitors. Can be overridden in input mapping individually for each graph monitor. | none (default) | positive number
Input mapping | no | Input mapping defines how to extract run ID and other graph monitor settings from incoming token. See Input Mapping. | CTL transformation
Output mapping | no | Output mapping maps results of successful graphs to the first output port. Output mapping is used also for sending of current status in case the monitoring interval is specified. See Output mapping. | CTL transformation
Error mapping | no | Error mapping maps results of unsuccessful graphs to the second output port. See Error mapping. | CTL transformation
Redirect error output | no | By default, results of failed graphs are sent to the second output port (error port). If this switch is true, results of unsuccessful graphs are sent to the first output port in the same way as successful graphs. | false (default) | true
Advanced
Run ID | no | Statically defined run ID of monitored graph. This attribute is usually overridden in input mapping by data from incoming token. | string

### Details

The MonitorGraph component allows watching of running graphs. Each incoming token triggers new monitor of a graph specified by run ID extracted from the token. It is possible to monitor multiple graphs at once.

A single graph monitor watches the graph and waits for it to finish. When the graph is finished running, graph results are sent to an output port in the same manner as in ExecuteGraph component; results of successful graphs are sent to the first output port and unsuccessful graphs are sent to the second output port. Moreover whenever time specified in the monitoring interval attribute elapses, the graph monitors send current graph status information even for still running graphs.

In case no input port is attached, only one graph is monitored with the settings specified in component's attributes. In case the first output port is not connected, the component just prints out the graph results to the log. In case the second output port (error port) is not attached, first graph that fails would cause interruption of the parent job.

Input mapping defines how to extract run ID and other settings of the graph monitor from incoming token. Whenever graph results or actual graph status need to be mapped to output ports, output mapping and error mapping attributes are used to populate output tokens. Information available in graph results comprise mainly from general runtime information, dictionary content and tracking information.

| Note
Only graphs executed by the current jobflow (direct children) can be watched by the MonitorGraph component.

#### Input Mapping

Input mapping is regular CTL transformation which is executed for each incoming token to specify run ID of monitored graph and settings of respective graph monitor. Available output fields:

Field Name | Type | Description
--- | --- | ---
runId | long | Run ID of monitored graph. Overrides component attribute Run ID.
timeout | long | Overrides component attribute Timeout.
monitoringInterval | long | Overrides component attribute Monitoring interval.

#### Output mapping

Output mapping is regular CTL transformation which is used to populate token passed to the first output port. The mapping is executed for successful graphs or for current status of still running graphs, which is sent in case monitoring interval is specified. More details about input records for this output mapping is available in documentation for ExecuteGraph component.

The graph monitor finishes watching the graph after the graph is complete or timeout elapses. Another option how to stop graph monitoring is to return STOP constant in output mapping.

#### Error mapping

Error mapping is almost identical to output mapping.This error mapping is used only if the graph finished unsuccessfully or timeout elapsed. The second output port is populated by error mapping.

### See also

Common Properties of Components
Specific Attribute Types
Common Properties of Job Control
Job control Comparison

Prev | Up | Next
Loop | Home | Table of Contents | MonitorJobflow