File System Monitor Service Event Document Mapping

The File System Monitor service event type includes the child definition type Document Mapping. A document mapping is defined to map a file or other data generated by the service event’s command to a property within the application. Data that may be mapped includes a file created by the command, output written by the command to standard error or standard output, or the exit code passed to the operating system by the command.

Multiple document mappings may be defined for the same parent service event to capture each of these values. This can allow the application to determine if an error occurs when the service event’s command is executed, as well as specific information about the error.

File System Monitor Service Event Document Mapping Attributes

  • Property: This attribute specifies the property to which the data extracted by the document mapping is assigned. The data type of the property selected should reflect the setting for the Output Type attribute.
  • Output Type: This attribute specifies which output from the service event’s command contains the data to be mapped to the item referenced in the Property attribute. This may be set to one of the following options:
    • Command Exit Code: This selection specifies the value returned by the command to the operating system. This exit code will be the value stored in the item selected in the Property attribute. The property selected should of type integral number to store the command exit code in most cases.
    • File Created by Command: This selection specifies that the file created by the service event’s command should be assigned to the item referenced in the Property attribute. This data of the selected property should be External Data when this Output Type is defined.
    • STDERR: This selection specifies that any output from the service event’s command written to STDERR, or standard error, is assigned to the item referenced in the Property attribute. The data type of the selected property should be String when this Output Type is defined.
    • STDOUT: This selection specifies that any output from the service event’s command written to STDOUT, or standard output, is assigned to the item referenced in the Property attribute. The data type of the selected property should be String when this Output Type is defined.
  • File Name: This attribute is available only when the Output Type is set to File Created by Command. The File Name attribute specifies the name of the file created by the service event’s command that is to be referenced by the item selected in the Property attribute. This attribute can include the SDML <<script>>, which expands to the name of the file in which the service event’s command is stored. It is common to use this value as a part of the name for the file generated by the command.
  • Delete File: This attribute specifies whether or not to delete the file created by the service event’s command. When set, the file will be removed after the service event has finished processing it. Otherwise the file will remain after the service event has completed processing.