About Sessions

A session definition is an integral part of a process control event. The session setup process enables you to configure and edit process control session scripts. Sessions are defined independently from the event, so the same session definition can be scheduled multiple times.

A session script consists of a list of commands (Sterling Gentran:Server® functions) that the system executes in the sequence listed. You can set parameters for each allowable command. You can also place conditions on the command you choose. These conditions determine whether or not the command is executed within the session.

You can specify two types of conditions: The system can query for the presence or absence of a specific file; the system can determine whether or not documents exist in a specific location. If the evaluated condition is true, the command is executed. If the condition is false, the command is skipped and processing continues with the next defined command.

Commands

The following lists the script commands and their actions:

Command Action
Exec_Program Indicates a program for the system to run.
Note: When this command is executed, the system writes an informational message to the Audit Log indicating which program (command line in working directory) was run.
Exec_Program_Ex Indicates a program for the system to run and for which the system will pass the Event ID and controller name.
Note: This function is used by the Sterling Gentran:Server for RosettaNet install program.
File_Copy Copies a file.
Note: When this command is executed, the system writes an informational message to the Audit Log indicating that the file copy was successful.
File_Rename Changes the name of a file.
File_Delete Removes a file from the system.
Note: When this command is executed, the system writes an informational message to the Audit Log indicating that the deletion of the file was successful.
GDW_Archive Performs the archive command according to the specifications of a selected archive definition file.
GDW_Audit_Rpt Copies the audit records to a specified file.
GDW_Audit_Purge Deletes all audit records in the system.
Note: The purged Audit Log entries are removed from the database and appended to a text file. To ensure that the text file does not grow unchecked, you may want to use a File_Delete command prior to this command.
GDW_Audit_Write Writes a processing user audit message to the Audit Log, based on the specified parameters.
GDW_Document_ Purge Removes document records from the Sterling Gentran:Server database according to the specified age/date, location, partner name, transaction, and/or status.
GDW_Document_Rpt Creates a specified file that contains document data (as well as group and interchange data, if applicable) for documents in the Sterling Gentran:Server database according to the specified status, location, and/or age/date.
GDW_Export Performs the Export function and can perform the send mailbox function to enable the output of an inbound translation to be delivered back to the Mailbox Server Manager.
Note: You must have an export translation object registered with the system.
GDW_ExtData_Delete Deletes external data references based on the action taken on the external data and/or age.
GDW_Import Performs the Import function on a specified file.
Note: You must have an import translation object registered with the system.
GDW_Notify_Purge Deletes all notification records in the system or deletes them by age, if specified.
Note: The purged notification log entries are removed from the database and appended to a text file. To ensure that the text file does not grow unchecked, you may want to use a File_Delete command prior to this command.
GDW_Partner_Delete Executes the partner delete command.
GDW_Partner_Import Executes the partner import command.
GDW_Partner_Export Executes the partner export command.
GDW_Print Performs the Print function.
Note: You must have a print translation object registered with the system.
GDW_Process_File Invokes the post-communications process with any EDI file as if the file was received via a communication session.
Note: You must have an export translation object registered with the system.
GDW_Receive Performs the Receive Only function.
GDW_Send Performs an automated send for all partners and mailboxes that have documents posted to be sent (unless you specify a particular partner, mailbox, and transaction combination).
GDW_Send_Receive Performs the Send/Receive function. This function does not wait for previously executed Send/Receive sessions to finish; it executes the Send/Receive when you specify.
Inbound_Recovery Executes the Executive service inbound mailbox recovery.
Outbound_Recovery Executes the Executive service outbound mailbox recovery.
Terminate_Script Terminates the script.

The following lists the script conditions and their actions:

If the condition is... Then it indicates that...
If File Below Exists the system must look for the file you specify and then execute the command based on whether the file is found or not found.
If Docs Are In the Location Below the system must look for the documents in the location you specify and then execute the command based on whether or not the documents are found in that location.