To call a batch file for renaming the file with a unique identifier for Adeptia:AS2 message information is needed to record in Adeptia log database for further integration and processing. To insert the data in the SQL table:
- Access Adeptia log database and ensure it has the table name “AU_AS2Logs”. Please create the table if it is not available.
- Login to the JSCAPE MFT Server Web Interface.
- Go to the Domains tab, select the domain, and click Edit.
- Select Triggers from the left pane of the window.
- Click AddIn the Triggers tab, select the same trigger that was created for Run Process Action and click Edit.
The Add Edit Trigger window appears. - Provide the name and description of Click Next to define the trigger condition.Select "File Upload" in the Event Type drop-down list.
- Click Next.
- Move to Trigger Action window and select the Action as "Run Process". Click OK.
- Provide the absolute file path and file name in the Program text box for your batch file.
- Define the space separated arguments in the Arguments text box. You can also use predefined variables.
- Provide the name and path for the batch execution in the Output Stream and Error Stream text boxes respectively.
Click OK.Info Click Add Variable to use predefined variables for getting the path and file name of the uploaded file.
Click Add Function to use predefined functions in JSCAPE. - Define the Trigger Action as “SQL Query” and click OK to define the SQL credentials.
- Provide the jdbc credentials in the respective fields and type your SQL query that you want to execute through the trigger. You can also use Add Variable to insert AS2 message data into the table dynamically with the help of prebuilt variables provided by JSCAPE Server.
- Click OK.
Info You need to put the jdbc driver jar respective to the Database server in use, in the libs directory of the default installation directory of the JSCAPE server.
Also, you need to make an entry of the JDBC class in the Server > Settings > JDBC Drivers before using SQL Query Action. Select the above created event and click Apply to apply the new changes.