Appendix

Appendix 1: How to determine the Production Scheduler version

There are various ways to determine the version of Production Scheduler.

Sage only uses the first three parts of the version number.
  1. On the Production Scheduler (PlannerOne) manager startup splash screen.
  1. From the Production Scheduler manager Summary tab.
  2. Click Show version info.

  1. In the + section of the Production Scheduler function (FUNPSSCH) (Manufacturing > Production Scheduler > Production Scheduler).

Appendix 2: How to check the current mapping version

  1. To check the current mapping version, first perform a search for JSNX3 and choose the JSON-X3 transformation mapping function.
  2. Display the Mapping code specified in the table, for example POPSENVDET.
  3. Look for the X3 alias mentioned in the table, for example MATFIXDAT.

Appendix 3: How to change the logging level of Production Scheduler manager

The Production Scheduling logging level is set to INFO, by default. This provides a lot of information, however, sometimes more information is needed.

To change the logging level means issuing some PowerShell commands.

  1. First run a PowerShell window.
  2. It is best to run a PowerShell window as Administrator to avoid permission problems.

  3. Change directory to the Production Scheduler PowerShell directory. You can find this where Production Scheduler is installed (usually C:\Sage\Planner_one_for_Sage_X3\SAGE.6.0.xxxx\module, where xxxx is the version number).
  4. Run the init.ps1 script.
  5. All available commands are displayed.

  6. Check the current log level.

Change the logging level. The highest level is DEBUG.

Appendix 4: Using the Postman application to identify problems

Postman is a standalone application that enables bundles and web services to be accessed without having to write a program. The latest version can be downloaded from the following location: https://www.getpostman.com/.

Set up Postman before testing Sage X3.
  1. To use Postman to identify problems set the Authorization Type to Basic Auth.
  2. Add the Sage X3 Username and Password.
  3. Enter the URL for the data request. There is a specific format for the request URL depending on the action. External and internal requests are available. The internal request gets data directly from Sage X3 without using the bundle.
  4. The request is sent to Sage X3 and data returned.
  5. mess and sev are the elements that Production Scheduler does not recognize.

    In our example we see the actual error message is a transformation error. Transformation errors suggest a mapping problem.

    We may get other errors that point to a problem in the code or user permission problems.

Variable parts of URL

The variable parts used in the URL for a data request are currently as follows:

Variable Part
{protocol} http
{host} Sage X3 host server
{port} Port number (if used)
{app} Sage X3 folder
{class} Sage X3 class
{site} Site code (called Environment in PlannerOne)
{timestamp} Timestamp, in posix format
Only data updated after this time will be sent.
External variable Part
{representation} Sage X3 representation
nnnnn Unique tracking ID number generated by the calling system.
Internal variable Part
{maxrec} Maximum number of entities per slice (as detailed in JSNX3TRAN or 0 for all).
{endtimstp} Maximum timestamp used to look for records, based on first request runtime.
{curtab} Table where maximum entities were exceeded.
{curkey} Key where maximum entities were exceeded.

External request types

Bulk query - to retrieve all of the sites

{protocol}://{host}:{port}/bundles/ortems/X3/erp/{app}/{class}?representation={representation}.$bulk&trackingId=nnnnn

Detail query - to retrieve all of the information for a site

{protocol}://{host}:{port}/bundles/ortems/X3/erp/{app}/{class}('{site}')?representation={representation}.$details&trackingId=nnnnn

Detail query - to retrieve all of the information for a site that has changed since the timestamp

{protocol}://{host}:{port}/bundles/ortems/X3/erp/{app}/{class}('{site}~{timestamp}')?representation={representation}.$details&trackingId=nnnnn

Edit post - send information to update in Sage X3

{protocol}://{host}:{port}/bundles/ortems/X3/erp/{app}/{class}('{site}')?representation={representation}.$edit&trackingId=nnnnn

Examples

Internal request types

Detail query - to retrieve all of the information for a site including the maximum size of data slice

{protocol}://{host}:{port}/api1/X3/erp/{app}/{class}('{site}~~{maxrec}')?representation={representation}.$details

Detail query - to retrieve all of the information for a site that has changed since the timestamp plus the maximum size of data slice

{protocol}://{host}:{port}/api1/X3/erp/{app}/{class}('{site}~{timestamp}~{maxrec}')?representation={representation}.$details

Detail query - to retrieve all of the information for a site that has changed since the timestamp with continuation information

{protocol}://{host}:{port}/api1/X3/erp/{app}/{class}('{site}~{timestamp}~{maxrec}~{endtimstp}~{curtab}~{curkey}')?representation={representation}.$details{site}- Site code (called environment in PlannerOne)

Examples

Appendix 5: Using Wireshark to retrieve publish data

Wireshark is an application that monitors network traffic. It enables us to see data being sent to and from Production Scheduler. The latest version can be downloaded from the following location: https://www.wireshark.org/.

Wireshark captures all network traffic. Sage advise you check that it is permitted to use this network traffic analyzer on a site.

Install Wireshark on the Production Scheduler server.

It is a good idea to enter a capture filter to only capture traffic to and from Sage X3. You can do this by filtering traffic using the Sage X3 port number. In our example this is 8124.

  1. To add a capture filter, in Wireshark click the Manage filters icon.
  2. This allows you to enter a new filter.

  3. Specify the Sage X3 port number and give it a name.
  4. Select this filter from the list.
  5. Click the network link (in our example this is Ethernet 2) to view the traffic.
  6. Most of the traffic will not be useful, but when we do a publish we need to look for a specific type of request - a POST request.

  7. To search for the POST requests, select the Find Packet option.
  8. Search for POST, specifying STRING as the Display filter type.
  9. We are interested in the first POST request.

  10. Right-click on the Media type. Select Copy to copy the data in the request, then select As printable text.
  11. Once you have copied the data you need to view it. We use Notepad++.
    1. What you see using Notepad++ is not very readable.
    1. We save the file as a JSON type file, then to get a more readable version, format it using a JSON viewer plugin.
Our developers need the information in the POST request to resolve the issue.