Troubleshooting
Overview
This section provides step-by-step instructions on how to resolve common issues experienced when using Production Scheduler.
Prerequisites
The following table lists the current requirements for each post patch level.
Sage X3 delivery/Production Scheduler: List of elements needed for Sage X3 by Sage X3 version
Sage X3 patch level | Production Scheduler version | Transformation mapping data version |
Unique attribute of mapping |
---|---|---|---|
V11.0.1 |
6.0.1651 |
ProductionSchedulerMappingData-V2 |
Any records |
V11.0.2 |
6.0.1651 |
ProductionSchedulerMappingData-V2 |
Any records |
V11.0.3 |
6.0.1651 |
ProductionSchedulerMappingData-V2 |
Any records |
V11.0.4 |
6.0.1705 |
ProductionSchedulerMappingData-V3 |
POPSENVDET - MATFIXDAT |
V11.0.5 |
6.0.1723 |
ProductionSchedulerMappingData-V4 |
POPSENVDET - CUSVAL |
V11.0.6 |
6.0.1739 |
ProductionSchedulerMappingData-V5 ProductionSchedulerMappingData-V6 |
POPSENVDET - PRVWOID POPSENVUPDEDIT - STROPEDT |
V11.0.10 / V12.0.3 |
6.0.1829 |
ProductionSchedulerMappingData-V6 |
POPSENVUPDEDIT - STROPEDT |
V11.0.11 / V12.0.15 |
6.0.1842 |
ProductionSchedulerMappingData-V6 |
POPSENVUPDEDIT - STROPEDT |
Appendix 1 to check your version of Production Scheduler.
Appendix 2 to check the current mapping version.
Troubleshooting 1: Site not initializing
There are a number of reasons why it may not be possible to initialize a site in Production Scheduler. Some of the most common reasons are detailed below.
Our example is a generic error so we need to look in detail at the logging information.
- We look at the time of the error and locate this time in the log. In our example it is 10:16:16 on 02/02/2018:
- By looking backwards from the error time, we can see another error, Agent cannot be null, and a warning, Unexpected property sev/mess in environment.
- The significant message is the Unexpected property.
This happens when Production Scheduler receives information it does not know how to process.
- The significant part of this message is the sev and mess.
These are errors messages from Sage X3, but not the actual error.
- The significant message is the Unexpected property.
- To view the actual Sage X3 error we must use a different tool.
- Using Postman, we can see the mess and sev elements that Production Scheduler does not recognize. However, the actual error message is a transformation error.
Transformation errors suggest a mapping problem.
We go to the section Issue with mapping data.
Identifying the issue
- Check the Summary tab in the Production Scheduler Manager.
- If a site will not initialize in Production Scheduler there can either be an error, or a warning against the Production Scheduler ERP Adapter.
Invalid configuration information
- To see if there is a connection error, first check the Configuration Manager tab.
- A warning icon (red) shows that Production Scheduler is not able to contact Sage X3, therefore the information provided must be incorrect.
- Is your Windows username and/or password (Sage X3 username and password) invalid?
- Is the server name incorrect?
- Is the REST services port (Sage X3 port number) or instance (Sage X3 folder name) incorrect?
No access to Sage X3 (can depend on start-up process)
This issue is similar to the previous issue (Invalid configuration information). However, the reason is different.
- Check the Configuration Manager tab to see if there is a connection error.
- A warning icon (red) shows that Production Scheduler is unable to contact Sage X3.
- An information icon (orange) shows that Production Scheduler cannot verify the server connection.
It could be that Sage X3 is unavailable because it is still starting.
Correct the start-up sequence of the servers so that the Production Scheduler server is the last to start.
A user does not have access to the specified Sage X3 folder (LOCALDEV). Production Scheduler is therefore unable to retrieve any data.
Connection to Sage X3 but still not initializing
Having checked the connection information, Production Scheduler can talk to Sage X3 but the sites are still not initializing.
- In order to understand the issues, click the Production Scheduler Logging tab.
- Once the Production Scheduler service is running, you can choose which log to view.
- Click Open/Refresh log.
- The log is now open, however the oldest information is listed.
- To see the most recent information click the Follow tail check box.
- To view up to date information click the Auto refresh check box. This updates the log with new information automatically.
Be careful as it is not possible to navigate through the log when Auto refresh is enabled. - The log information shows only general information, no errors.
- The quickest way to see errors that have occurred is to look at the Error list tab. This gives a brief description of the error.
- Click the error to see more detail.
- Click the double chevron (>>) action to obtain even more information.
It is best to select the PlannerOneApplication.log as this is the latest log. This log contains all information, not just errors.
This might be enough to determine the source of the problem.
Issue with mapping data
Having identified an issue with the mapping data there is a simple fix.
Problem in the code
Sometimes there is an issue in the code which results in a site in Production Scheduler not initializing. This is rare as most issues have already been fixed.
There may, however, still be issues that have not yet been discovered.
- Code problems can look very similar to mapping issues in that you get a similar warning - sev/mess unexpected property in the log file. Identification of the problem is the same.
You can try the Postman application to identify problems.
- Sometimes the error provided is not detailed enough.
You can use Postman with an internal request directly to Sage X3 to give more details.
This gives us the exact error and the script and line on which it occurs.
Troubleshooting 2: Cannot access Production Scheduler from Sage X3
Normally, you would access Production Scheduler using a Sage X3 function such as the Production Scheduler function (FUNPSSCH) (Manufacturing > Production Scheduler > Production Scheduler).
If this functionality is not working you must observe the problem, then investigate it.
In this section we show you how to detect and resolve likely causes of being unable to connect to Production Scheduler.
The port number of our instance is 9990.
We check the Production Scheduler Manager. We can see it should be 9120.
World Wide Web Publishing service not running
To check if the World Wide Web Publishing Service is running, open the Services program.
Check the Status of the World Wide Web Publishing Service. It should be set to Running.
Production Scheduler web site not running
If you now have a Cannot get or validate token error, the website for the instance might not be running.
Check Internet Information Services (IIS) Manager for the instance website.
Production Scheduler service not running
If you still have a Cannot get or validate token error, the Production Scheduler service might not be running.
- Check the Summary tab in the Production Scheduler Manager.
- If the Windows Service is at status On error (red), check the Windows service tab to see if there is a problem, or if the service is running.
- Select the correct service for the instance and click Select.
PSCLIENTID parameter not set
If you have the Information message: Unable to obtain authentication token, Sage X3 cannot create the authentication token to send to Production Scheduler.
This means that the client ID is missing or invalid.
- Check the PSCLIENTID – Production Scheduler client ID parameter (EXAPP chapter, MIS group).
Make sure that in the List of connected applications in the Connected applications function (Administration > Administration > Settings > Authentication > Connected applications) the Client ID matches the one for this tenant.
Incorrect connected application data
If you now have the error: Production Scheduler took too long to respond.
Check that in the List of connected applications services in the Connected applications function (Administration > Administration > Settings > Authentication > Connected applications) the URL is correct.
Troubleshooting 3: Data flow from Sage X3 to Production Scheduler
Once everything has been setup correctly data can be sent from Sage X3 to Production Scheduler. However, there can be issues resulting in some work orders not appearing in Production Scheduler.
In this section we show you how to detect these types of issues and how to resolve them.
Standard guidelines for missing work orders
If there are missing work orders in Production Scheduler and it is not clear which work orders are causing the problem:
Remove all work orders from Production Scheduler, then reintroduce them one by one.
If there are too many work orders, introduce them in small batches to narrow down the work orders causing the problem.
Invalid data in Sage X3
If there are missing work orders in Production Scheduler, data in Sage X3 could be incorrect.
- Check the Summary tab in the Production Scheduler Manager.
- The Production Scheduler Manager is reporting all items are at status Ready (green).
- Windows Service Errors are listed.
-
To see what the Windows Service Errors are look at the Error list.
Example (2)Our error list references WO000119 and WO000120. These are our missing work orders.
- View the error details.
- Check if the missing work orders use the missing resource (work center).
- Check if the missing work center is a valid work center.
It is normal for the Resource Planner ERP Adapter to remain at status Unknown (question mark).
These must be investigated.
Our example shows 26 Windows Service Errors.
The error explains that there is a missing resource: Resource does not exist.
Our example shows a resource called MISSING does not exist.
Our missing work order WO000119 does use the work center called MISSING.
Our example shows work center MISSING is not listed.
This is why Production Scheduler has an error.
- Now check all other work orders for any that use the missing work center.
- If the other missing work orders do not use the missing work center you must investigate further.
- Check each work center used on the missing work orders.
Our example has the same error message for work order WO000120.
We check the work order. It does not use the work center MISSING. We must investigate further.
Is the missing work center defined as a Replacement work center?
Our example uses MISSING as a replacement work center.
Sage X3 sends all replacement work centers as alternatives when scheduling, so this produces the same error.
Check all missing work orders for the same problem and change the work centers.
Example (8)We change the work centers for our two problem work orders – WO000119 and WO000120.
![]()
![]()
Other data issues
Some data issues can cause problems with site initialization. These can produce errors that are not obvious from the log.
- View the log in the Production Scheduler Manager.
- You can try the Postman application to identify problems.
- To find the work order causing the problem, follow the guidelines of removing all work orders and then adding them one by one.
For our example we use Postman to check Sage X3.
The result gives us the stack trace that details the line of code where the error occurs.
This is a known problem.
Our example has a problem with work order WO000126. All the operations are closed but the work order is still active.
The workaround is to remove the work order from Production Scheduler. There is no more work to schedule as all of the operations are complete so this should not affect us, or we can close the work order.
You might need to remove the problem work order from Production Scheduler.
You could just close the work order.
- View the log in the Production Scheduler Manager again.
- You can use Postman to give more details.
- To find the work order causing the problem, follow the guidelines of removing all work orders and then adding them one by one.
- Click the Scheduling action to view the scheduling information.
- Click the Graph action to view the graph.
- Now click the Show list icon to view the list of operations.
- Check the time the operation is due to end.
Our example appears to be identical to the previous issue. Postman returns identical results.
This gives us the stack trace that details the line of code where the error occurs.
This is a known problem.
For our example, work order WO000127 is causing the problem.
This issue is caused by a difference between the capacity of the work center and the default capacity for the site.
The workaround is to ensure that the time schema associated with the weekly structure matches the capacity.
Our example work center is SEATTLE. The weekly structure is SC6.
- We drill into the weekly structure.
- The daily capacity is 24 hours. However, there is no time schema specified.
- The default time schema STD specified in the DEFDIH - Default schedule parameter (GPA chapter, LOA group) is applied.
- The default time schema STD only has a capacity of 8 hours.
This is why there is a problem with the calculation of the time.
- We specify a time table schema with the correct capacity.
- We add the time table schema to the weekly structure.
Mapping problems
It is possible to have mapping problems that do not stop a work order being sent to Production Scheduler but does not transfer some of the data.
- Check the data sent to Production Scheduler. We use Postman to view the data from Sage X3.
- We use Postman again, but this time using api1 instead of the bundle.
- Look at the mapping data for the POPSENVDET mapping code.
For our example we again use a timestamp (although using the format for Sage X3).
We get the data back and can see that we do have a fixed date.
There must, therefore, be a mapping problem, as Sage X3 is returning the correct information, but the bundle is not.
Our example lists the FIXED value; the FIXDAT value is missing.
Add the mapping data back.
- Resubmit the work order.
Time zone not set / incorrect
Comparing details with the previous issue (Mapping problems), you might have a problem with the time zone.
Our example has an operation with a start date and time of 02/26/2018 09:00:00.
The work order scheduling information shows a start time of 08:00:00:
This is likely to be a problem with the time zone.
- The time zone is set in the PSTIMEZONE – Server time zone parameter (EXAPP chapter, MIS group) from a selection list.
The time zone in the PSTIMEZONE – Server time zone parameter must be set to the server time zone.
There is one known issue with the display of operations and time zones.
We know that in our example the start time of the operation is correct at 08:00:00, however, the operation appears to start at 07:00:00 in the Gantt chart. This is because the chart is rendered in the browser and uses the time zone of the browser, not the server.
This issue has been raised with 3DS, but it is noted to make you aware and avoid support calls.
Issues in the code
Comparing details with the Mapping problems issue again, you might have a problem with the time zone.
- As with the fixed date previously, you must determine why wait time is not being sent to Production Scheduler.
- Follow the same path and use Postman to determine where the error is.
- To restrict the returned data use a timestamp.
- To determine what the timestamp should be you can use the In columns function (GSTDCOL) (Development > Utilities > Maintenances > In columns) to check the update datetime on the work order.
- To return datetime information, select OK.
Set the column UPDDATIM to Display and set the Selection field to the work order.
- Convert the datetime for the bundle request into a timestamp.
You can use a website to convert the datetime.
- You now have the timestamp to use as part of the key for the bundle request in Postman.
- Check the output from Sage X3.
Our example timestamp is 1518082920.
We use this as part of the key for the bundle request in Postman.
The data we receive has a timeOutResourceAfter as zero.
This implies there could be a mapping problem.
For our example we set the timestamp to be a Sage X3 date time as in the In columns function (GSTDCOL).
The output is returned.
Our example also shows zero WAITIM. There is no mapping problem.
If there was no WAITIM line in the output then it may be a missing value in the representation, but as we have the property WAITIM, albeit with a wrong value, there must be something in the code which is not outputting the wait time.
In our example we have manually changed the code to not output the wait time, but there may be scenarios where there is an issue in the code which means incorrect information being sent to Production Scheduler.
We change the code back to the original.
Correct the code then resubmit the work order.
Troubleshooting 4: Data flow from Production Scheduler to Sage X3
Issues with data from Production Scheduler to Sage X3 are more difficult to analyse. They are not as easy to emulate as you cannot normally see the information that is being sent by Production Scheduler and the Production Scheduler logging provides minimal help as it normally only gives an http 500 error.
As an http 500 error does not give any indication of what the error might be you need to use the Sage X3 application logging, and in some cases Wireshark, to discover what the cause of the issue is. Some of the most common reasons are detailed below.
Work order data does not exist
Sometimes the published data in Production Scheduler is out of sync with Sage X3, therefore the publish is trying to update information that does not exist.
- If logging is enabled on the site, set the PSLOGTRACE - Production scheduler trace parameter (EXAPP chapter, MIS group) to Yes to see if there were any errors during the update process.
- Use the Log reading function (LECTRACE) (Reports > Reports > Log reading) to see the log files produced during an update:
- Open the last file and look at the final entries.
Remove the referenced work order and then try the publish again.
Our example is prefixed POPSUPD followed by site code USA10, then the time 12:23:04.
We open the last of these files – POPSUPD122304 – and look at the final entries.
This tells us that an operation could not be updated as a record was not found.
We would need to remove this work order and then try the publish again.
Work order locked (in use)
This is a very difficult issue to reproduce as it is not possible to change a work order whilst it is in Production Scheduler. However, as part of a production tracking the work order will be updated, so it could be locked at the point the Production Scheduler update is trying to access it.
This should only be a temporary situation and performing another publish should complete successfully.
For our example we follow the same process as the example above (Work order data does not exist) to look at the application log.
Again we are told that an operation could not be updated as a record was not found.
We should be able to try the publish again, and hopefully the lock has been removed.
Invalid mapping
If information is not reaching Sage X3 after a publish in Production Scheduler you need to check the mapping against the output from Production Scheduler.
- Use Wireshark to retrieve the information being published by Production Scheduler.
- Check the values in the JSON against the mapping code POPSENVUPDEDIT in the JSON-X3 transformation mapping function.
- Match the invalid property in the output from Production Scheduler to the mapping value.
Correct the invalid property.
Our example starts with an extract of the output from Production Scheduler.
There is a comment, however, when this work order is updated in Production Scheduler the comment has disappeared. This must mean that somehow Sage X3 is not recording the comment.
We need to check the output against the mapping.
- We open the JSON-X3 transformation mapping function and select the POPSENVUPDEDIT mapping code.
- We look at the mapping for the JSON class path.
- We see that there is no property comment, but there is one called comments.
So the class path for comment is workOrders.operations.markers.
This mismatch is the cause of the problem.
We change the mapping to comment.
We should begin to get the comments in Sage X3 and then sent back to Production Scheduler.
Problem in the code
Although all issues with publishing have been resolved, it is possible there may be a scenario that we have not envisaged that causes a problem in the code.
We find these issues by looking in the application log.
- Enable the application logging by setting the PSLOGTRACE – Production scheduler trace parameter (EXAPP chapter, MIS group) to Yes.
View the last log starting with POPSENVUPD to see if there were any errors during the update process.
- For our example we follow the same process as the example above (Work order data does not exist) to look at the application log.
- We view the last log starting with POPSENVUPD.
-
The final entry is Operation update MFGNUM = WO000119.
- We look at the previous log file.
-
The last entry is End of processing.
This means that the update process did not complete successfully as we did not get the End of processing message in the previous log file.
This is likely to be a problem in the code as the process has not completed.
Time zone not set/incorrect
If work orders published from Production Scheduler to Sage X3 have operation start or end times that differ from Production Scheduler, the time zone parameter may not be set or may be incorrectly set.
Follow the procedure for Sage X3 to Production Scheduler Time zone not set / incorrect to correct the error.