Change Resource Group ID for Open Jobs

FYI you can run a trace during your tests. It will help you with what dataobject are being sent to be processed.

I believe I have setup my directive the way you described. To make things even simpler I manually unengineered, unreleased, and unscheduled the job in question. Just in case those were locking up my details.

First, I pull the DatasetForTree.
Next, I set rowmod=U for the JobOpDtl table based on the ttResults query, mapped as shown.
Then, I update tsJobs.
Then, I ChangeResourceGrpId for tsJobs.


I get some new errors now:

Error Detail

Message No.: 1
Description: Cannot change the primary production operation at this point.
Program: Erp.Services.BO.JobEntry.dll
Method: JobOpDtlBeforeUpdate
Line Number: 31742
Column Number: 17
Table: JobOpDtl
Field: PrimaryProd
Message No.: 2
Description: Cannot change the primary setup operation at this point.
Program: Erp.Services.BO.JobEntry.dll
Method: JobOpDtlBeforeUpdate
Line Number: 31746
Column Number: 17
Table: JobOpDtl
Field: PrimarySetup

I think the last method, ChangeResGrpIDs should do the changing of the Primary Prod and Setup.

You need to do the change before you update.

Swapping the order of Update and ChangeResGrpID returns the same error.

Where’s that method being called?

I assume it is occurring in the Update method. It only occurs when I include that method.
When I run a trace on my custom action , the methods look completely different. So I am not exactly sure.

When I remove the update method, the action actually does complete without error. However, the record does not get updated.

You don’t need the Update one.

First, I pull the DatasetForTree.
Next, I set rowmod=U for the JobOpDtl table based on the ttResults query, mapped as shown.
I am guessing you aren’t updating the correct JobOpDtl, based on this.
ChangeResourceGrpId for tsJobs.

What is the trace of this?

These are the methods from the trace. If I don’t have the update method in there, the action completes without error, but does not update the record.

img23 img24

This trace looks completely different than the JobEntry trace, so I am not sure how to compare them. I don’t see any of the methods I expected to see. Like where is GetDatasetForTree, and ChangeResoureceGrpID?

I think the tracing from the BPM needs to be looked at server side.

image

Just out of curiosity, pop in some message boxes that show your row mod. Do a message box in between each step. Sometimes those change methods will fork with the row mod.

Between start and GetDataset:
"JobOpDtl.RowMod = "

Between GetDataset and Rowmod=U:
“JobOpDtl.RowMod = ;;;;;”

Between Rowmod=U and ChangeResGrpID:
“JobOpDtl.RowMod = ;;U;;;”

Adding the server BMP logging didn’t give me anything useful in my trace.

That doesn’t show up client side. Forget it for now.

What is it between ChangeResGrpID and Update? (or just after ChangeResGrpID if you don’t have the update)

And what else do you have in your message? It looks like you have an empty row?

add one more box at then end. And show some other stuff to make sure the row is being populated.

check the box for JobNum, AsmSeq, OpSeq etc. Make sure there is something in the row.

I see that my messages are returning all the operations for the selected Job from the JobOpDtl table. Hence the ;;;;;;;
My message is based on the tsJobs.JobOpDtl field query.

I changed my set field by query widget to update only the changed rows, instead of all the rows.

Now I am back to getting the error: Operation Detail is not available.

Since I had better results with “all” rows on, I changed this back. It look slike in my last message the rresource grou ID is changed in tsJobs.JobOpDtl. Clearly this tableset isn’t being pushed out to the database.

So I added the update back at the end, and now I get those same two errors:

Cannot change the primary production/setup operation at this point.

Perhaps I need to do something else to help the system update those fields? I thought the ChangeResGrpID method would do that for me.

Thanks again Ken and Brandon. I know you both must have real jobs too. I really appreciate your patience and dedication!

what does your set record query look like?

For the Set Field By Query Widget I have the following properties:
MyQuery = ttResults (all fields)
update all rows of
tsJobs.JobOpDtl
with mapping as show:
img27