Step Type: File Document Management Step

A File Document Management step is defined for a File System Connection and defines a command to be executed by the Agentry Server on the host system of the Server in support of transferring files between the Server and the Agentry Client. The command for this step is stored in a text file executed as a script by the Server. This step type also includes a child definition to encapsulate mappings between the file data and the data members of the mobile application. A File Document Management step is defined for a specific definition type within the same module.

A file document management step can define a command to be executed to retrieve a file from a file system or version control system so that it may be transferred to the Agentry Client. The child definition document mapping can then associate this file with an object property, normally of type External Data. It may also define a command that moves a file referenced by an External Data property within a transaction to a permanent location on the file system or version control system. The file is also associated with the property via the document mapping child definition.

The definition for which the step is defined may be an object, transaction, or fetch. The property referencing the file to be transferred should be a child property of the selected definition.

A component of this definition is the Document Management Script. This script contains the command or commands the Agentry Server will execute in support of the file transfer behavior. This script is by default a Windows batch script (.bat). The file extension for the script may be changed to reflect the type of script language it contains.

The document management step can be defined to wait for the command it executes to return, or it can execute the command without waiting. If defined to wait for the command, the next step to be processed in the synchronization will not be run until the command has completed execution, or until a defined wait period has been exceeded. If the wait period is exceeded, the Agentry Server will log an error and synchronization will stop.

For downstream synchronization, i.e. fetch, push, or object read step processing, the command is expected to product a file to be transferred to the Agentry Client. For upstream synchronization, i.e. transaction processing, the command is expected to process the file after it has been transferred from the Agentry Client to the Server’s host system. This may include moving it to another location on the file system, or checking it in or updating it to a version control system, or any other post-transfer processing that should occur for the file.

In addition to the file itself, it is also possible to capture values from the document management command run by the step. This is behavior is also defined in the child definition document mapping. Return values, error codes, and similar data can be assigned to properties of the appropriate data type.

The contents of the script file for this step type may be accessed directly on the Agentry Development Server for the application project. The file path listed for this file is relative to the installation location of this Server. If this file is modified it is not necessary to publish the application project for the change to be exhibited. In a production environment this file is not directly accessible in this manner and must be modified through the Agentry Editor. Changes made in a production environment must be published.

File Document Management Step Child Definitions

Document Mapping: 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.

File Document Management Step Attributes

  • Name: Contains the unique internal name of the step definition. This value must be unique among all step definitions within the same module.
  • Connection: This attribute references the system connection for which the step is defined. This attribute is set when the step is initially created and cannot be modified. For a File Document Management step this must be a File system connection type.
Wait Attributes
  • Wait: This attribute specifies whether or not the Agentry Server should wait for the command executed by the step to complete before processing the next step in the synchronization process. When set to true, the Server will wait for the duration of time specified in the Wait Period Limit attribute. If the command does not complete within this limit, the Server will attempt to kill the command process. It will then log an error message and halt synchronization.
  • Wait Period Limit: This attribute specifies the duration of time the Agentry Server is to wait for the command executed by the step to complete. This attribute is available only when the Wait attribute is set to true.
  • Delete Script File: This attribute specifies whether or not the script file created by the Agentry Server as a result of processing the script file for SDML expansion should be deleted or kept. This attribute is available only when the Wait attribute is set to true.
Document Management Script Attributes
  • File: This attribute contains the path and file name of the script file containing the step’s commands. This is relative to the path
    ServerDirectory\Application\Development\Scripts
    

    where ServerDirectory is the installation location of the Agentry Development Server.

  • Command: This attribute is set to the SDML data tag <<script>> by default. This tag expands to the script referenced in the File attribute. If the command does not contain this data tag, its contents are assumed to be the command to be executed by the Server. In this case the command must be a single line, which may contain SDML tags.