A document mapping definition is a child to a file document management step and defines the correlation between the file produced by that step to a property definition, normally of type External Data. The specific behavior of a document mapping differs depending on the type of definition for which the parent step was defined. For objects and fetches, the document mapping defines where and how to access the file produced by the parent step’s command. For a transaction, the document mapping defines how and where the file should be provided to the step’s command.
Because of the differences between a document mapping for an object and fetch, and one for a transaction, there are different attributes for this definition type depending the how the parent step has been defined.
When a document mapping is defined within a file document management step for an object or fetch, the purpose of the document mapping is to capture output from the parent step definitions document script and map it to a property within the object or fetch. This output is primarily intended to be a file that is mapped to an external data property. This file will be transferred down to the Agentry Client. Other outputs may be captured from the document script, including output written to standard out and standard error, as well as the command’s exit code as returned to the operating system.
When a document mapping is defined within a file document management step for a transaction, the purpose of the document mapping is to provide the contents of a property to the parent step definition’s document script. This input to the command may be provided from an external data property and passed to the command by either writing the file to the file system, or by piping it to the commands standard input. When piped to standard input, the option exists to pass the EOF character to that command after all file data has been passed in. When writing the file to the file system, the command is then expected to look for the file at that location and process it accordingly. When the command has completed processing the file, the option exists to delete the file from the file system. Note that this option will not be available if the parent document management step has been defined to not wait for the document script to complete execution.