Publish to a Custom Program

This is a Publish Option that can be used for integration to other systems.

When a Publish is initiated with this option checked,  APS Extra Services does the following:

  1. Attempts to load a Microsoft .Net dll called "CustomInterface.dll" in the Extra Services Working Directory. This dll must implement IPTCustomInterface as described below.
  2. Creates a memory-resident copy of the Publish DataSet is created. This matches the DataSet shown by the Browse Publish Data function.
  3. Calls the PerformExport method on the custom interface, passing the working directory path and the DataSet. At this point, the custom logic can be used update third party applications using the data in the Publish DataSet.

 

 

IPTCustomInterface

These are the elements of the Interface:

///<summary>
/// Trigger sending of transmissions to APS.
///</summary>
void PerformImport(string workingDirectory);

///<summary>
/// Fire this event to submit a Transmission to APS.
///</summary>
eventInterfaceDelegate.SendTransmissionHandler SendTransmissionEvent;

///<summary>
/// Export the data.
///</summary>
void PerformExport(string workingDirectory, PT.Database.PtDbDataSet dataset);

 

Example:

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Data;

 

using PT.Transmissions;

using PT.ERPTransmissions;

 

 

namespace PT.CustomInterface

{

public class CustomInterfaceExample:PT.CustomInterface.IPTCustomInterface

{

public void PerformImport(string workingDirectory)

{

throw new NotImplementedException();

}

 

public event InterfaceDelegate.SendTransmissionHandler SendTransmissionEvent;

 

public void PerformExport(string workingDirectory, Database.PtDbDataSet dataset)

{

throw new NotImplementedException();

}

}

}