Developer

Step Type: File Command Line Step

A File Command Line step is defined for a file system connection and defines a command to be executed by SAP Mobile Platform Server on the host system of the server. This command is contained in a script file, with a default file extension of .bat, which is the Windows batch file extension. This extension may be changed to match the script language used in the file. The command executed by SAP Mobile Platform Server can be monitored for its return value. The script file is processed by the server to expand any SDML tags it may contain prior to execution against the host system.

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.

As an alternative to storing the command in an external file, it may be contained in the Command attribute of the step. Such a command must consist of a single line. By default the Command attribute is set to the SDML tag <<script>>, which expands at run time to the file referenced in the steps File attribute.

A file command step can be defined to wait for the command it calls to complete execution. When defined in this manner, the back end synchronization for a user will not continue until the command returns, or until the defined wait period expires. If the wait period is exceeded, the Agentry Server will log an error and the synchronization will be halted.

If the step is not defined to way for the command to complete, an error will only be logged if the defined command cannot be executed by the Server for any reason.

The script file or the text in the Command attribute for this step is processed by the Agentry Server, which runs it through the Server’s SDML pre-processor before executing the step. The results of this SDML expansion are written to a temporary directory, based on the Server’s configuration.

File Command Line 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 Command Line step this must be a File system connection type.
  • File: This attribute contains the path and file name of the script file containing the step’s commands. This path 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 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.
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 result of processing the script file for SDML expansion should be deleted or kept. This attribute is available on when the Wait attribute is set to true.