Just putting my two cents in, but I know when we manually change a resource on a scheduled job, it causes various things to happen IF that job is not removed from the schedule and then re-scheduled. Make sure you can do this or you will run into this.
Global scheduling may handle it but how often do you want to run it?
I get this error for every row I tried to process. In my case 123 operations returned in the query. Thankfully epicor put them all into one error window so I didn’t have to click ok 123 times!
Operation Detail is not available.
Message No.: 1
Description: Operation Detail is not available.
Program: Erp.Services.BO.JobEntry.dll
Method: ChangeJobOpDtlResourceGrpID
Line Number: 11770
Column Number: 17
Table: JobOpDtl
My BPM may look a bit convoluted. I have to loop through each of the rows in my results query. Here is my BPM outline and variables:
I think this will be a regular task for a while as we update our internal systems to match the shop floor. However, I expect once the update is done we won’t be changing this kind of thing regularly. Maybe i’m making a mountain from a molehill, but its the journey not the destination. Right?
In an effort to implement this criteria, I have updated my BPM to check for engineered and released statuses. The BPM stores these values internally for each row of the query. Then at the end resets the original status based on that variable. Perhaps it is just my ignorance, but I couldn’t find a flag in the JobHead table for ‘isScheduled’. To determine if the job is scheduled, I just checked to see if both engineered and released are checked. If they are, then I assume it has been scheduled. (This is a big assumption on my part! Is there a better flag to check if a job is scheduled?)
Below I have included my updated BPM with all the criteria and BO methods in place. I also included a small portion of the resulting errors.
Partial list of Errors:
JobHead has not changed.
JobHead has not changed.
Can not remove from schedule, Job is still engineered.
Operation Detail is not available.
JobHead has not changed.
When I try to run this action I get the “Job has not changed.” error occurring on the method line. Of course this is a vastly simplified version, but I want to make sure I am taking the right approach.
The BPM is huge and ugly now that I included all the extra criteria to check and reset Engineered, Released, and Scheduled.
Did you use the trace utility to see what changed from the original data set to the final one? The BO’s change some stuff, but other stuff is changed by the UI and doesn’t show up in the trace. Those differences are what you would need to set using a set field widget.
Yes, I did run the trace while updating a job using the JobEntry form.
I opened the form, then started the trace.
Typed in my job number.
Clicked Op 40 in the tree view.
Clicked the Resource in the tree view.
Selected a new Resource Group from the list.
Copied the value from the Resource Group box.
Clicked on Op 40 in the tree view.
Pasted that value back into the operation Description field.
Saved the job.
Ended the trace.
I am using the trace parser.
When I compared the Update methods, I noticed a lot of fields marked as changed contain a decimal “0.000” and the return show integer “0”. I don’t need to worry about these right?
Otherwise I see a few other fields changed that I am not accounting for, including:
If I am understanding correctly, I need to set the values for these fields using a process similar to what I outlined above. Right? When I use the setfield widget do I set the ttResults field or the tableset field?
This look promising! I get my BPM to run now, and the results in the BAQ screen are updated, but when I Get List from the Analyze tab, I can see the records are not being updated.
So the process I am using is basically:
GetByID (JobNum, myDS)
Update myDS.JobOper Table By Query
Update myDS.JobOpDtl Table By Query
Update (myDS)
For the two update by queries I included only the fields I want to update (ResGrpID, Descriptions, and RowMods). I set the table criteria for JobNum, AsmSeq, and OpSeq using the values pulled from the current row of ttResults. I set the queries to update only changed rows in the table. Is that right?
The action completes without error but the underlying records are not updated. Thanks for working through this with me!
I might need some fine tuning with that program. Things fly by pretty fast after I removed the duplicate frames! Let me know if this is unusable, and I can try again.
Try double clicking on a row, that should change it to yellow, (if it doesn’t you might have to add a check box or something to give you something to change) then run your custom actions, then click update.
edit: I don’t think that will work either. Like @knash said, you are setting your TT fields, but trying to update the DS that you got, so they aren’t the same.
Here is my BPM. I think it is setup correctly based on what I have read, and what you all have said.
It runs ok, but doesn’t update the record. I am going to have to sleep on this for another day.