filereader-call

This plug-in reads the local filesystem file’s content, and saves it in output GVBuffer ‘object’ field. Complete file path is the concatenation of ‘srcPath’ attribute, with the ‘fileName’ attribute. Both of them can contain placeholders, that are expanded at plugin call time. Attributes ‘srcPath’ and ‘fileName’ are subject to these constraints:

  • attribute ‘srcPath’ is overridden by ‘GVFR_DIRECTORY’ property, if present in current GVBuffer. If property is not defined in GVBuffer, the ‘srcPath’ attribute in the configuration is used. In both cases, the value of this attribute can be a placeholder, resolved at plugin call time, and the result of the expansion, must result in an absolute pathname, otherwise an exception is thrown. An exception is also thrown if neither the property nor the attribute in configuration are set.
  • attribute ‘fileName’ is overridden by ‘GVFR_FILE_NAME’ property, if present in current GVBuffer. If property is not defined in GVBuffer, the ‘fileName’ attribute in the configuration is used. In both cases, the value of this attribute can be a placeholder, resolved at plugin call time, and the result of the expansion, combined with the previous attribute, must result in an existent resource in the local filesystem, otherwise an exception is thrown. An exception is also thrown if neither the property nor the attribute in configuration are set. Can contains the following placeholders:
  • fixed : a text string;
  • $ : a System property name;
  • sp : a System property name;
  • env : an Environment variable value;
  • @ : a inProperties property name;
  • timestamp : return the current timestamp, in optional tZone value, formatted as ‘pattern’
  • dateformat : reformat ‘date’ from ‘source-pattern’ to ‘dest-pattern’, and optionally from ‘source-tZone’ to ‘dest-tZone’
  • decode : evaluate as if-then-else; if ‘field’ is equal to cond1…n, return the value of val1…n, otherwise ‘default’
  • decodeL : is equivalent to ‘decode’, with the difference that ‘condX’ can be a list of values separated by ‘sep’
  • script : evaluate a ‘lang’ script, using the base context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • js : evaluate a JavaScript script, using the context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • ognl : evaluate a OGNL script, the GVBuffer is added to the scope as ‘object’ (and is also the object on which execute the script !! NO MORE FROM 3.5 !!),
  • sql : execute a select sql statement sql and return the value of the first field of the first selected record. The ‘conn’ parameter is the JNDI name of a DataSource
  • sqllist : execute a select sql statement sql and return the value of the first field of all selected records as a ‘sep’ separated list. The ‘conn’ parameter is the JNDI name of a DataSource The ‘sep’ parameter defaults to comma
  • sqltable : executes a select sql statement and returns all values of returned cursor as an XML. The ‘conn’ parameter is the JNDI name of a DataSource.

Fixed attributes:

  • type: Unmodifiable. Used by GreenVulcanoESB factory framework.
  • class: Unmodifiable. Used by GreenVulcanoESB factory framework.

Implied attributes:

  • fileName: This value can be static or dynamic, containing placeholders that could be replaced at plugin call time. This is a default value, and is used if the property ‘GVFR_FILE_NAME’ is not defined in the current GVBuffer.

Required attributes:

  • srcPath: This value can be static or dynamic, containing placeholders that could be replaced at plugin call time. This is a default value, and is used if the property ‘GVFR_DIRECTORY’ is not defined in the current GVBuffer.
  • name: Operation name. Used in the ‘Flow’ section to associate workflow nodes to VCL operations.

Subelements

filereader-call has the followong subelements:

  • Description (optional).
  • xml-processor (optional).

xml-processor

If this element is specified, the plugin will read the file directly parsed as an XML.

Implied attributes:

  • namespace-aware: If true the DOM keeps informations about the declared namespaces on the file. This option applies only if ‘as-xml’ is true. Default is false.
  • validating: If true the XML representing the file is validated. This option applies only if ‘as-xml’ is true. Default is false.
  • as-xml: If true the file is parsed as an XML. Default is false.
  • use-axiom: If true uses AXIOM instead of DOM to parse the file. Default is false.

Subelements

xml-processor has the followong subelement:

  • Description (optional).