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 16, 2025

Hi CB

 

>Can you please say which version of RTPPM you have? We use version ThingWorx 9.3.9-b1648.

 

Oh, there's a few things to know here. First that's a very old version that isn't supported anymore, I'll still help you but if we can't find the solution quickly my answer might be "you need to upgrade". 9.7.0 should be a great version to upgrade to, you just need to be careful about the TagResetValue after upgrading to 9.5.0+ (re-read this documentation, TagResetValue section). Second, the number you gave me is for Thingworx, not RTPPM. For RTPPM, go in Composer -> Manage (the gear icon) -> Installed Extensions (at the bottom) -> RTKPI extension. The number should be around 2.0.1 for you.

 

For the product : I'm understanding that you only use 1 product per machine, so an equipment never needs to change it after the 1st one starts. In that situation you can leave it as normal, or if you're certain it will never change then you can remove the tag binding on the ProductRemoteTag property so it will never detect a change, or disable subscription ProductTag_Subscription so it never processes it. But the product tag should not cause a joborder change, so you're not forced to do this to fix the joborder issue.

 

For the joborder : Can you please confirm if the JobOrderRemoteTag property/tag has changed value? This is my main suspect right now : that it is bound to a tag, and the tag value changed, so the subscription automatically changed the running joborder. Similar to the product, if you're certain that you never want to change it via subscription, you could remove the tag binding on JobOrderRemoteTag or disable subscription (JobOrder_Subscription). This will disable the automatic process that reads the tag and changes the running joborder. It will still let you change the joborder manually in the screen (Operator Dashboard).

 

If you want to validate if this was the issue, you can edit the JobOrderRemoteTag property, set its Log setting to True, and it will save all the changes in Valuestream. Then after the issue happens, you can check the time when the joborder was started "by mistake" in the Joborderrun table in SQL, and check if there was a value in JobOrderRemoteTag at that same time (in Thingworx's value_stream table in SQL, or using the QueryPropertyHistory service).  Remember to remove the Log setting after you check this. If this is not the root cause, then my only other suspects are custom code or someone manually clicking in the screen.

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