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. Publishing a scenario exports the current scenario’s 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 all data that would be published using the configured publish options. Users can either view all data (in a tree view or in 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 that you are pushing out to SQL of Excel and to look for particular pieces of information.

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 be used to 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 that is 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 types of 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 un-checking) 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:

    Procedures:

    • Run Stored Procedure after Scenario Publish: This field is used to define the stored procedure(s) to run after publish 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 be used to 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 results of the schedule change 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
    AS
    BEGIN
    END
        • 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, APS 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 APS.net Extra Services Windows service, the path to the file must be valid on the computer where APS.net Extra Services is installed and accessible by the service.
    • Publish dates using server's local time instead of UTC: This option is unchecked by default and will affect all dates being published. 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 time.

    History:

    • Retain Published Schedules:  This can be used to store previously published schedules.  This can be helpful for creating reports that compare changes in schedules 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 prior to publishing the next set of data.
    • 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.  This can be used therefore to save disk space if the full schedule does not need to be archived.  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 that is 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 that is 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 then it is deleted when the next publish occurs.

    Delete "What-If" History older than:  This can be used to further limit the number of “What-If” schedules that are 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, APS will only publish the changes that have occurred since last publish.
      • The net change publish is 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 then move an activity and you 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. 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 be used to 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 the 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 publish options will be used. The following options are available:
      • All
      • To XML
      • To Database
      • Custom
      • Analytics
    • Automatically publish when creating new publish scenario: When checked, APS will publish the schedule automatically when a new Publish Scenario is created. 

    Watch: Exporting to Excel & Browsing Data