Skip to main content
Version: Adeptia Suite

Inserting Logs for the Files Sent to the Trading Partner

You can also insert the logs for the files sent to your Trading Partners by defining a trigger as described in the below steps:

  1. Create a trigger with Event Type selected as "Directory Monitor File Added".

  2. Click Next and move forward to define the trigger action.

  3. On the Trigger Action window, click Add.

  4. Select the Trigger Action as "SQL Query" and click OK.

  5. Define the SQL Query parameters and click OK.

    Use the following QUERY in the SQL Query trigger action:

    INSERT INTO AU_AS2LOG(AU_LOCAL_DIR, AU_DOMAIN_NAME, AU_FILE_NAME, AU_FILE_SIZE, AU_FILE_MODIFICATION_TIME, 
    AU_TIMESTAMP, AU_TYPE, AU_STATUS) values('%Directory%', '%DomainName%', '%Name%', '%FileLength%',
    '%FileModificationTime%', unix_timestamp('%Year%%Month%%DayOfMonth% %Hour%:%Minute%:%Second%')*1000+%Millisecond%, 'OUTBOUND', 'Ready to send')
  6. After that add a new trigger action as "Trading Partner Regex file Upload" to send files to your Trading Partner. 

  7. Click OK and add the details.

  8. After that again add a new "SQL Query" trigger action to log the status of the file send to the Trading Partner into the Log database.

  9. Select the Trigger Action as "SQL Query" and click OK.

  10. Define the SQL Query parameters and click OK.

    Use the following QUERY in the SQL Query trigger action:

    UPDATE AU_AS2LOG SET AU_STATUS='SENT' WHERE AU_FILE_NAME='%Name%'
  11. Click OK.

  12. Select the newly created trigger and click OK.