Skip to main content
12-Amethyst
July 14, 2025
Solved

About RTPPM Job Order System And Sync Configuration

  • July 14, 2025
  • 2 replies
  • 2210 views

Hi Everyone.

 

I have a service that takes job orders from ERP and saves RTPPM's job order and job order ap table. And works just fine.

But my problem is sometimes job orders and products change via equipment things even job order sync and product sync configurations are disabled. (For information Use Job Order Model and Use Product Model is enabled.)

 

Is there any service that changes this tables?

Best answer by mstarnaud

Hi

 

Officially, endpoints only work for CWC and not RTPPM. Meaning there's a chance that it doesn't work correctly (for example : joborder missing an important information for RTPPM). And also you couldn't create support tickets for issues about this.

 

Now, does it realistically work? I have an old memory that there was one small reason why it did not work, but I'm not sure what it was. One of my suspects is maybe it puts the joborder in the wrong status (Not Scheduled?) which might be used by CWC and not RTPPM. If I'm correct, in order to work with RTPPM it would require an additional piece of code to change its status.

 

If possible, you should try to confirm if it works, it's not too complicated. Note that if it doesn't work, make sure that Timer PTC.FSU.CORE.Process.ProcessQueue_TM is enabled and has its 4 subscriptions active, as this is needed to finish importing with endpoints. On my side I will try to also test it soon but I'm not sure when I will have time.

2 replies

16-Pearl
July 14, 2025

Hi CB

 

Can you please say which version of RTPPM you have?

 

Please answer the following questions, it will help debug this : 

- The Joborder and Joborder_ap tables are filled by the service that receives them from ERP. This is correct so far?

- The product table, is it also filled by the same service that receives them from ERP? If not, what else feeds it?

- In the Configuration tab, the SyncJobOrders and SyncProducts options are set to False, is this correct?

- Did you enable the RTPPM subscription called ProductTag_Subscription on the equipment? For reference, this just puts the product in the todo list.

- Did you enable the RTPPM subscription called JobOrder_Subscription on the equipment? Or does JobOrderProdEvent_Subscription contain the code for joborder & is enabled? For reference, this just puts the joborder in the todo list.

- Did you enable the RTPPM subscription called ProductionByTagAndTime_SubscriptionService on the equipment? I think it should be, even if your products & joborders come from ERP.

- When you want to change the active product or joborder, how do you do it? Do you use the tags and subscriptions? Do you use the Operator Dashboard screen? Do you have custom code for this (coming from ERP)?

- When a product or joborder comes (I'm guessing this is from a tag), it changes the already-existing information in the Product and Joborder and Joborder_ap tables. And this is your problem. Did I understand this correctly?

 

 

- Can you please use the following query to get the list of paths & routing items configured (change the equipment name in the condition near the end) : 

 

SELECT	e.uid 'EquipmentUid',
		e.name 'EquipmentName',
		pp.uid 'PathUid',
		pp.name 'PathName',
		pp.equipmentuid 'PathEquipmentUid',
		pp.isreleased,
		ri.uid 'RoutingItemUid',
		ri.equipmentuid 'RoutingEquipmentUid',
		ri.productionpathuid 'RoutingPathUid',
		ri.sequencenumber,
		ri.isscheduledpoint,
		ri.isproductionnotification,
		ri.isproductionpoint,
		ri.iscountforwaste,
		ri.isconstraintunit
FROM	equipment e			WITH(NOLOCK)
LEFT
JOIN	productionpath pp	WITH(NOLOCK)
							ON	pp.equipmentuid = e.uid
LEFT
JOIN	routingitem ri		WITH(NOLOCK)
							ON	ri.productionpathuid = pp.uid
							OR	ri.equipmentuid = e.uid
WHERE	e.name = 'EQUIPMENT_NAME_GOES_HERE' -- CHANGE THIS
AND		(
			pp.equipmentuid = e.uid
			OR
			ri.equipmentuid = e.uid
		)
ORDER
BY		pp.uid		ASC,
		ri.uid		ASC

 

- Can you get all the PathUids and/or RoutingPathUids returned by that query, and then run this second query looking for a joborder that was modified?

 

SELECT	jo.uid,
		jo.id,
		jo.actualstarttime,
		jo.actualendtime,
		joap.name,
		joap.displayname,
		joap.productionpathuid,
		joap.plannedquantity,
		joap.productuid,
		e.uid 'EquipmentUid',
		e.name 'EquipmentName',
		COUNT(jor.uid) 'RunsCount',
		MIN(jor.starttime) 'RunsStart',
		MAX(COALESCE(jor.endtime, '2030-01-01')) 'RunsEnd'
FROM	joborder jo			WITH(NOLOCK)
JOIN	joborder_ap joap	WITH(NOLOCK)
							ON	joap.uid = jo.uid
LEFT
JOIN	joborderrun jor		WITH(NOLOCK)
							ON	jor.joborderuid = jo.uid
LEFT
JOIN	equipment e			WITH(NOLOCK)
							ON	e.uid = jor.equipmentuid
WHERE	(
			joap.productionpathuid IN(1,2,3,4,5,6,7,8,9) -- CHANGE THIS
			OR
			joap.name = 'JOBORDER_NAME_HERE' -- CHANGE THIS
		)
AND		(
			jor.uid IS NULL
			OR
			e.name = 'EQUIPMENT_NAME_GOES_HERE' -- CHANGE THIS
		)
GROUP
BY		jo.uid,
		jo.id,
		jo.actualstarttime,
		jo.actualendtime,
		joap.name,
		joap.displayname,
		joap.productionpathuid,
		joap.plannedquantity,
		joap.productuid,
		e.uid,
		e.name
ORDER
BY		joap.name	ASC,
		jo.uid		ASC

 

Note that these queries work on versions before 9.7.0, I would need to adapt them slightly for the latest versions.

 

The reason I put those queries here is I am suspecting that maybe you have problems with the configuration of paths, routing items, or the ProductionPathUid column of the Joborder_ap table. For example if you leave the ProductionPathUid column empty when you insert the Joborder_ap, I think you would get the issue you're mentioning and it could result in having a "duplicate" joborder. Also if you have more than 1 Routingitem record returned by the first query it could give strange results when the models run, I suspect it would just cause an error and ignore the tag's value but I'm not sure. Feel free to post the results of the queries here if you want, but you might want to remove the names if you post it here in public.

 

12-Amethyst
July 16, 2025

Hi


 

 

Can you please say which version of RTPPM you have?

We use version ThingWorx 9.3.9-b1648.

 


- The Joborder and Joborder_ap tables are filled by the service that receives them from ERP. This is correct so far?


Yes that is correct

- The product table, is it also filled by the same service that receives them from ERP? If not, what else feeds it?


No. The product table is filled by customer. It's predeterminated. We check if product exist before add joborder from ERP. If it is'nt exist then we do not add that job order.

- In the Configuration tab, the SyncJobOrders and SyncProducts options are set to False, is this correct?


That is also correct.

- Did you enable the RTPPM subscription called ProductTag_Subscription on the equipment? For reference, this just puts the product in the todo list.


 Yes it is enabled.


- Did you enable the RTPPM subscription called JobOrder_Subscription on the equipment? Or does JobOrderProdEvent_Subscription contain the code for joborder & is enabled? For reference, this just puts the joborder in the todo list.


Yes this is also enabled.

- Did you enable the RTPPM subscription called ProductionByTagAndTime_SubscriptionService on the equipment? I think it should be, even if your products & joborders come from ERP.


If you meant ProductionByTagAndTime_Subscription yes that is enabled too.

 

- When you want to change the active product or joborder, how do you do it? Do you use the tags and subscriptions? Do you use the Operator Dashboard screen? Do you have custom code for this (coming from ERP)?


In this departman, all joborder comes with one product. So we don't want to change product accually. while you mention suscription, maybe we should disable it. Is it correct?

- When a product or joborder comes (I'm guessing this is from a tag), it changes the already-existing information in the Product and Joborder and Joborder_ap tables. And this is your problem. Did I understand this correctly?


We manually open joborder. from operator dashboard. So we don't use kepware tag. we only use tag for downtimes.

- Can you please use the following query to get the list of paths & routing items configured (change the equipment name in the condition near the end) : 


If you want we disguess theese. If we can't fix it, i will share rest of it.

Sincerely






16-Pearl
July 30, 2025

Hi

 

2 important parts to know : 

 

- the Endpoint service will do a quick check to see if the json looks good and put the result in a todo list : it's the ProcessRunning table in SQL. Then there is a Timer called PTC.FSU.CORE.Process.ProcessQueue_TM (the one I mentioned earlier) that will regularly check if there are records to process, and it will try to finish the import & create the Joborder. To see the progress of this, you can look at the ProcessRunning and ProcessCompleted tables and check the status & DebugMessage.

 

- About the SQL table for Joborders, this is the only one that uses the _ap table. So half the information is in the Joborder table and half the information is in the Joborder_ap table, with the same Uid. I believe for RTPPM the most important parts are : Joborder.Id, Joborder.StatusDefinitionUid, Joborder_ap.name, Joborder_ap.Displayname, Joborder_ap.ProductUid, Joborder_ap.PlannedQuantity (optional).

12-Amethyst
July 31, 2025

Hi @CB_10149096


I wanted to follow up with you on your post to see if your question has been answered.
If so, please mark the appropriate reply as the Accepted Solution for the benefit of other members who may have the same question.
Of course, if you have more to share on your issue, please let the Community know so that we can continue to support.
 

Thanks,
Abhi