Fsmonitor-call

From GreenVulcano Wiki
Jump to: navigation, search

Description

Use fsmonitor-call plugin for scanning a specific directory looking for the number of files existing, created, modified and cancelled since the last scan.

VulCon / GV Console Configuration

This GreenVulcano® ESB plug-in, when invoked, performs a scan of the directory specified in configuration, and returns a report in XML format (following the schema AnalysisReport.xsd) that can be configured to display any combination of the information listed below:

  • files CREATED in the directory since the last scan performed
  • files MODIFIED in the directory since the last scan performed
  • files DELETED from the directory since the last scan performed
  • files EXISTENT in the directory


You can restrict the scan to only files whose names conform to a regular expression defined in configuration.

If the invocation of the plug ends with the generation of a report, this report is included in the object field of output GVBuffer.

In the output GVBuffer are also set the following properties:

  • GVFSM_REPORT_CREATED set to true if a report XML and was created.
  • GVFSM_EXISTING_FILES set if the filter existing was configured and in target directory exist files whose name conforms to the pattern specified in configuration. Contains the number of such files.
  • GVFSM_CREATED_FILES set if the filter created was configured and the in target directory, after the last scan performed, were created file whose name is consistent with the pattern specified in the configuration. Contains the number of such files.
  • GVFSM_MODIFIED_FILES set if the filter 'modified' was configured and the in target directory, after the last scan performed, were modified file whose name is consistent with the pattern specified in the configuration. Contains the number of such files.
  • GVFSM_DELETED_FILES set if the filter 'deleted' was configured and the in target directory, after the last scan performed, were deleted file whose name is consistent with the pattern specified in the configuration. Contains the number of such files.


The fsmonitor-call Element is used by Channel and routed-call. It has the following attributes:

Attribute Type Description
type fixed This attribute must assume the value call.
class fixed This attribute must assume the value it.greenvulcano.gvesb.virtual.file.reader.AnalyzeDirCall.
name required Operation name. Used in the 'Flow' section to associate workflow nodes to VCL operations.

Its subelements are:

LocalFileSystemMonitor

This subelement configures a LocalFileSystemMonitor instance, to be used to monitor a local file system directory.

The LocalFileSystemMonitor Element is used only by fsmonitor-call. Its attributes are:

Attribute Type Description
type fixed This attribute must assume the value fs-monitor.
class fixed This attribute must assume the value it.greenvulcano.util.file.monitor.LocalFileSystemMonitor.
path required Absolute path to monitor on local file system. Can contains placeholders which will be replaced at runtime.

It has the following subelements:

RemoteFileSystemMonitor

Configure a RemoteFileSystemMonitor instance, to be used to monitor a remote file system directory.

The RemoteFileSystemMonitor Element is used by fsmonitor-call.

Its attributes are:

Attribute Type Description
type fixed This attribute must assume the value fs-monitor.
class fixed This attribute must assume the value it.greenvulcano.util.file.monitor.RemoteFileSystemMonitor.
path required Absolute path to monitor on local file system. Can contains placeholders which will be replaced at runtime.

Might contain the following sub-elements:


InMemoryMonitorStatus

Configure a InMemoryMonitorStatus to be used to hold a FileSystemMonitor status in memory.

The InMemoryMonitorStatus Element is used by LocalFileSystemMonitor and RemoteFileSystemMonitor.

The element's attributes are:

Attribute Type Description
type fixed This attribute must assume the value fs-monitor.
class fixed This attribute must assume the value it.greenvulcano.util.file.monitor.InMemoryMonitorStatus.
dumpStatus required If 'true' (default) the status is dumped on log on every update.
The attribute's admitted values are:
  • true
  • false

FileMonitorStatus

Configure a FileMonitorStatus to be used to hold a FileSystemMonitor status in a local file.

The FileMonitorStatus Element is used by LocalFileSystemMonitor and RemoteFileSystemMonitor.

Its attributes are:

Attribute Type Description
type fixed This attribute must assume the value fs-monitor-status.
class fixed This attribute must assume the value it.greenvulcano.util.file.monitor.FileMonitorStatus.
statusFilePath required The absolute path of the monitor status file.
errorOnInvalidFile optional If true (default) an error is raised for invalid status file.
The attribute's admitted values are:
  • true
  • false

FileFilter

Defines a file filter configuration. The FileFilter Element is used by LocalFileSystemMonitor and RemoteFileSystemMonitor.

Its attributes are:

Attribute Type Description
file-mask optional Regular expression for file name matching. Default to all files.
file-type optional Filter for file type. Default to 'files-only'. The attribute's admitted values are:
  • files-only
  • directories-only
  • all

ResultFilter

Filter the information in AnalysisReport generated from a FileSystemMonitor.

The ResultFilter Element is used by LocalFileSystemMonitor and RemoteFileSystemMonitor.

Its attributes are:

Attribute Type Description
existing required If true, extracts all the existing files. The attribute's admitted values are:
  • true
  • false
created required If true, extracts all the created files. The attribute's admitted values are:
  • false
  • true
modified required If true, extracts all the modified files. The attribute's admitted values are:
  • false
  • true
deleted required If true, extracts all the deleted files. The attribute's admitted values are:
  • false
  • true
sort-mode required Orders the output files by name or time. The attribute's admitted values are:
  • by-name
  • by-time
sort-ascending required Ascending order mode. The attribute's admitted values are:
  • true
  • false