Publish Options

These options affect how data is sent from PlanetTogether to an SQL database or ERP

Key Concepts

The Publish Options affect how data is sent from PlanetTogether to a SQL database or ERP. For example, publishing a scenario exports the current data to a SQL database specified in the config manager based on the publishing options set.

Setting Up the Publishing Options

Browse Publish Data: Browse Publish Data allows users to view the data that would be published using the configured publish options. Users can either view all data to be published (in a tree view or a grid view) or choose from the list of tabs that show specific subsets of the Publish Data. 

  • This is useful for browsing the data you are pushing out to SQL of Excel and looking for particular information pieces.

The following Publish Options are available:

  • Publish to SQL Server: Publishing to a SQL Server requires that a connection string be identified on the Data Publish tab of the Instance Manager

  • Publish to a Custom Program: A custom Microsoft .Net DLL can be called directly from PlanetTogether and passed to an in-memory dataset of the entire publish dataset.
  • Publish to XML: This writes a file to the special Windows folder Documents on the PC where the APS Extra Services is running. If Documents is not defined, then it goes to the Windows folder Common Documents. In both cases, the file is written to a subfolder called APS Export Files.
  • Publish to Microsoft Project import tables in SQL Server: These can populate a Microsoft Project file with the current schedule.
  • Publish to Analytics Database: When checked, the data will be sent to the database specified in the "Analytics" tab of the Instance Manager. This option provides users with a way to quickly send data to their analytics database and create reports. Note: This requires that a connection string be specified in the instance manager. 
  • Publish all Activities for a Manufacturing Order if any are Published: This option will cause all Activities of a Manufacturing Order to be published if any Activity within that MO has been published.
  • Ask which Resources to Publish when Publishing: This option allows the users to control what Resources are required for publishing. In the case of inactive Resources or Resources serving as “dummies,” it would be beneficial to leave them out of the publish since they are purposefully not reflecting a business reality.

    Publish objects dated within the next: Since published schedules are often used to update ERP databases, this usually needs to be set to a large value so that all jobs are updated in the ERP system. This setting limits the data that is published in the following ways:

    Note: Jobs, Manufacturing Orders, Operations, and Activities that are scheduled and have a Scheduled Start after the clock plus the amount specified for this option are not published. In addition, Purchases to Stocks that have a Scheduled Receipt date after the clock plus the amount specified in this option are not published.

    • Limitations for High Volume Data: These options can be used to limit which data is published and kept in history. These objects tend to have a very high volume (many records) and therefore consume a great deal of hard-drive space which extends the time it takes to publish the scenario.
    • Publish: This option is to prevent (by unchecking) the data from being published.
    • Keep History: This option determines whether the data is kept when schedule history is being used.

    The following settings can only be accessed in Settings | Scenario Data | Publish Options:


    • Run Stored Procedure after Scenario Publish: This field is used to define the stored procedure(s) to run after publishing is performed.
      • These are the stored procedure parameter definitions for the stored procedure called after a Publish is performed:
        • UserDefinedParameter:  This is a text parameter that can pass information, like parameter strings, to the stored procedure.
        • PublishDate: The date/time that will be stored in the PublishDate field in the Schedules table of the APS database.  This can be used in the stored procedure to only update records that were just published, as opposed to including records from previous publishes (only necessary if storing history).
        • Message:  This is a return message that is displayed in the Log Viewer window if non-null.
        • Undo: This can be set to 1 to cause an undo of the last action.  This is typically only used for the Net Change Publish, thus enabling the stored procedure to validate the schedule change results and undo the change if necessary.
        • Example declarations in a stored procedure:
    @UserDefinedParameter varchar(8000)

    ,@PublishDate DateTime

    , @Message varchar(8000) = ” OUTPUT

    , @Undo bit = -1 OUTPUT
        • Example of a stored procedure called “APS_PutData_GP”:
    ALTER PROCEDURE [dbo].[APS_PutData_GP]
    @UserDefinedParameter VARCHAR(8000),
    @PublishDate DATETIME,
    @Message VARCHAR(8000) = ” OUTPUT,
    @Undo BIT = -1 OUTPUT
        • On the Procedures tab of the Scenario Publish Options section, I will pass the text “GP10_Test, APS_Publish” to the APS_PutData_GP routine via the @UserDefinedParameter by placing the string after the SQL Stored Procedure reference in the “Stored Procedure to Run after Publish (in import database)” box as follows:
    APS_PutData_GP GP10_Test, APS_Publish
    • Run a Program after Publishing: If “Run a Program after (full or net-change) Publish” is checked and a valid path of an executable file is specified, PlanetTogether will run that program after publishing has been performed. This can be used to call a third-party application or generate a report using the newly published data. Since the program specified is called by the Extra Services Windows service, the path to the file must be valid on the computer where Extra Services is installed and accessible by the service.
    • Publish dates using the server's local time instead of UTC: This option is unchecked by default and will affect all published dates. If the box is checked, it will use the server's time for all dates; if it is unchecked, it will convert all dates to UTC.


    • Retain Published Schedules:  This can store previously published schedules or store multiple published scenarios. For example, this can help create reports that compare schedule changes over time or various What-If scenarios.  If this is checked, then previously published data is preserved subject to the various options below.  Otherwise, all tables are cleared before publishing the next set of data. Note: This feature can be used to publish multiple scenarios but cannot publish multiple scenarios simultaneously (the publishes will be sequential).

    Note: To retain custom tables, you can set the ClearCustomTables column to false in the SystemData table found in the published database.

    • Delete activity scheduled to start beyond the next:  This can be used to keep only “short term” schedule history.  It is usually not necessary to store the entire schedule for old schedules.  Therefore, this can be used to save disk space if the full schedule does not need to be archived. For example, when a Scenario is published, previously published data is purged in the following way:
      • Jobs, Manufacturing Orders, Operations, and Activities that were previously published and have a Scheduled Start after their Scenario’s Clock (at the time they were originally published) plus this amount are deleted.
      • Purchases to Stocks that were previously published and have a Scheduled Receipt date after their Scenario’s Clock (at the time they were originally published) plus this amount are deleted.

    Delete All History older than This can be used to limit the number of schedules that are stored.  If a schedule was published beyond this amount of time in the past, it is deleted when the next publish occurs.

    Delete "What-If" History older than This can be used to limit further the number of “What-If” schedules stored.  If a “What-If” schedule was published beyond this amount of time in the past, then it is deleted when the next publish occurs.

    Net Change Publish:

    • Enable Net-Change Publishing: By selecting this checkbox, PlanetTogether will only publish the changes that have occurred since the last publish.
      • The net change publishes designed to update the schedule row on the currently publish data after a simulation. The system looks for changes to the scheduled resource, scheduled start time, and scheduled end dates at the activity level to determine whether a net change has occurred.
      • Any simulation that causes one or more of those three properties to change will trigger the database update to change the value of the flags in the schedule row for those jobs.
      • For example, after you run a publish if you move activity and have the net change option set to true, a database update will be triggered to update the schedule row for the job the activity belongs to. Therefore, it is not required to publish again after a move to get the flag to update.
    • Run Stored procedure after Net-Change Publish: This field is used to specify what stored procedure, if any, should run after Net Change Publish.

    Reports: This tab can specify the security to use for the Reports that connect to a Database.

    • You can decide to use Windows Integrated Security or use the specified Database Security. 
      • If using Database Security, you can enter the User Name and Password for access to the database.

    Automatic Publish: 

    • Automatically publish scenario: If enabled, the scenario details will be automatically published after a period of inactivity.
      • Specify a Time Period: There will be an automatic publish of the schedule after no user actions have occurred for this amount of time. The minimum value is 1 minute.
    • Destination: You can specify which destinations should automatically be published. All other publishing options will be used. The following options are available:
      • All
      • To XML
      • To Database
      • Custom
      • Analytics
    • Automatically publish when creating a new publish scenario: When checked, PlanetTogether will publish the schedule automatically when a new Publish Scenario is created. 

    Watch: Exporting to Excel & Browsing Data