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

About RTPPM Job Order System And Sync Configuration

  • July 14, 2025
  • 2 replies
  • 2214 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

mstarnaud
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






mstarnaud
16-Pearl
July 22, 2025

Hi CB

 

Here's how the subscriptions work : 

 

- The tag puts the value in the ___RemoteTag property (Product and Joborder).

 

- There is a subscription on this property, that will copy the value in the Valuestream (saved values) of the Running___ property (Product and Joborder).

 

- There is a central subscription called ProductionByTagAndTime_Subscription. It's based on a timer that should trigger every 5 seconds. This will call a huge service that will call smaller services to do multiple stuff. It will check if there are waiting values in the Valuestream for Product, Joborder and Production. It will apply the changes (product change, joborder change, production change). And it will mark the Valuestream values as ready to be purged (there is another timer that will purge them some seconds later).

 

- There is also the option to use the button in the screen, to change the Joborder. I think what it does is it calls a service that is in the middle of the bigger service I just mentioned above, instead of using a value stored in Valuestream it receives the value from the one chosen in the screen.

 

So I suggested removing step 2, which would break the tag logic : the tag would not cause Joborder changes anymore. If that wasn't enough for you, it's because something else is causing those Joborder changes. It seems you have a lot of custom code, so it is my main suspect.

 

For the property bindings, it works like this : when a new Product or Joborder is detected in the Valuestream by the services I mentioned above, it will try to create it in the Product or Joborder table. It should not edit existing records. The service will already know the Name : it's the value in the tag/Valuestream. But to know what to use in all the other properties of the Product/Joborder, we can add those values in the PropertyBindings configuration. For example, products have a ProductType and a Displayname, so you can enter the values that you want to use in the Configuration tab. So for example if you write "Pallet" in the ProductypeName, then when it creates the product it will choose the Pallet product type. You can also write the name of a property that will contain the value. For example, for the Joborder's Planned Quantity, you can have a tag-based property called Planned_Qty, then write "Planned_Qty" in the PlannedQuantity binding, and so when a new Joborder gets created it will set the PlannedQuantity to the value that is inside the Planned_Qty property at that time. Most of these settings are optional, but I strongly recommend using the Product's ProductTypeName and the Joborder's PlannedQuantity bindings. This should be explained in this Joborder documentation and Product documentation.

 

For the Sync options, if you set them to True then the subscription will accept creating new Products & Joborders if they don't exist. If you receive a value in the tag/Valuestream (step 1 mentioned above), and that value is for a Product/Joborder that does not exist and you left the sync option to False, then it will throw an error to say the Product/Joborder does not exist so the value will be ignored.

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