Update Part Master Resource Group ID

Hi All!
The goal is to replace specific Resource Group IDs within part/revision/operations, at the master part level. I am not entirely clear on the correct terminology here. So for me, ‘master part’ is the list of operations in the method tracker. These part revisions may include approved and unapproved revs. Besides the ResourceGroupID, I also need to update the Operation Description field, PartOpr.OpDesc.

The process is to find all parts in the part tables, with operations that utilize a specific Resource Group ID. I call this the OldResGrpID. I pass this through a BAQ parameter into the PartOpDtl table to get my list of rows that need to be changed.

Once the BAQ returns the list of part/rev/ops to update, the BPM takes over. For testing I click the RunCustomAction button. Working through the workflow (attached):

  1. Set some initial variables.
  2. Get the part and rev from the next BAQ result row.
  3. Check out the part to my mass update group, “MU”.
  4. Check if the part is approved, if so set a flag so we can reapprove it later.
  5. If part was approved, unapprove it.
  6. Change the resource group id for the matching part in the mass update group in the ECOOpDtl table.
  7. If the part was previously approved, reapprove it.
  8. Check the part back in.
  9. Loop back to the next line in the BAQ results.

I have tested all of these steps in individual BAQs and BPMs. So I know they work by themselves. Now I am combining all the working pieces together, trying to get them to work with the entire list of BAQ results, not just one, hard-coded, sample.

Right now, my problem is at the first Update method, “Update tsApp1”. Here I try to unapprove an approved part after it has been checked out into my mass update group.
I get the error:

“Update not allowed to visual representation of PartRev record.”

The confusing part is that I don’t think I am trying to update the PartRev table directly, so one of the methods must be tapping into it.

Here is my outline, let me know if you need specifics for the individual widgets.

Has anyone seen that error before? Any ideas how to diagnose it?
Thanks for your time!
Nate

I might be incorrect here, but doesn’t Epicor have a task that will mass replace one resource group with another on all routings?

Yes, they do! We wanted a bit more flexibility out of it. Including updating the operation description.

I made two key changes to the workflow above. I removed both update methods. One in section 5, and one in section 7. After I did this, the process completed for the first row in the BAQ. That is, The part/rev was checked out into my ECO group “MU”. Then the part/rev was unapproved so that edits could be made to the routing. Then edits were made to the ResourceGroupID, and OpDesc. The part was then approved. The change worked perfectly, and quickly. However, instead of checking the part back in, and proceeding to the next row of the BAQ, the process stopped there at the first row, and returned a server error. I am not sure if I can trace it with my cloud dedicated tenancy. Any ideas?

Server Side Exception

A server error occurred. Review the server event logs for details.

Exception caught in: Epicor.ServiceModel

Error Detail

Description: A server error occurred. Review the server event logs for details.
Program: Epicor.System.dll
Method: ProvideFault
Line Number: 32
Column Number: 13
Server Trace Stack: at Epicor.Hosting.Wcf.ErrorHandler.ProvideFault(Exception error, MessageVersion version, Message& fault) in C:_Releases\ICE\ICE3.2.400.0\Source\Framework\Epicor.System\Hosting\Wcf\ErrorHandler.cs:line 32
at System.ServiceModel.Dispatcher.ErrorBehavior.ProvideFault(Exception e, FaultConverter faultConverter, ErrorHandlerFaultInfo& faultInfo)
at System.ServiceModel.Dispatcher.ErrorBehavior.ProvideMessageFaultCore(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage8(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.ProcessError(Exception e)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SecurityChannelListener1.ReceiveItemAndVerifySecurityAsyncResult2.InnerTryReceiveCompletedCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.InputQueue1.AsyncQueueReader.Set(Item item) at System.Runtime.InputQueue1.EnqueueAndDispatch(Item item, Boolean canDispatchOnThisThread)
at System.Runtime.InputQueue1.EnqueueAndDispatch(T item, Action dequeuedCallback, Boolean canDispatchOnThisThread) at System.ServiceModel.Channels.SingletonChannelAcceptor3.Enqueue(QueueItemType item, Action dequeuedCallback, Boolean canDispatchOnThisThread)
at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.CompleteParseAndEnqueue(IAsyncResult result)
at System.ServiceModel.Channels.HttpPipeline.EnqueueMessageAsyncResult.HandleParseIncomingMessage(IAsyncResult result)
at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.HttpInput.ParseMessageAsyncResult.OnRead(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Web.Hosting.AsyncResultBase.Complete(Int32 hresult, Boolean synchronous)
at System.Web.Hosting.PipelineRuntime.AsyncCompletionHandler(IntPtr rootedObjectsPointer, Int32 bytesCompleted, Int32 hresult, IntPtr pAsyncCompletionContext)

Client Stack Trace

at Epicor.ServiceModel.Channels.ImplBase1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Ice.Proxy.BO.DynamicQueryImpl.RunCustomAction(DynamicQueryDataSet queryDS, String actionID, DataSet queryResultDataset) at Ice.Adapters.DynamicQueryAdapter.<>c__DisplayClass33_0.<RunCustomAction>b__0(DataSet datasetToSend) at Ice.Adapters.DynamicQueryAdapter.ProcessUbaqMethod(String methodName, DataSet updatedDS, Func2 methodExecutor, Boolean refreshQueryResultsDataset)
at Ice.Adapters.DynamicQueryAdapter.RunCustomAction(DynamicQueryDataSet queryDS, String actionId, DataSet updatedDS, Boolean refreshQueryResultsDataset)
at Ice.UI.App.BAQDesignerEntry.BAQTransaction.<>c__DisplayClass384_0.b__0(Int32& rowReturned)
at Ice.UI.App.BAQDesignerEntry.Forms.BAQDiagramForm.ShowQueryResults(DataSet dsResults, getQueryResult getResults, ReportAdditionalInfo additionalInfo)
at Ice.UI.App.BAQDesignerEntry.BAQTransaction.CallRunCustom()

EDIT: Someone just told me the Epicor servers are having a fit today. I will try this again tomorrow to see if that was the issue.

After some more testing, I am still getting the server error. But I tweaked the order of things a bit as show below. Now the custom action runs all the way through the entire list of BAQ results before returning the server error. The only problem is the last part in the BAQ list is not being checked back in. The parts before it get checked out and back in just fine, that last part doesn’t check in, and I get the server error.

The error says to review the server event log for details. Do I have access to that as a dedicated cloud tenancy? Can you tell me where it is? Or anything else about the error I am seeing?

Perhaps there are still server issues affecting my testing. On some occasions all of my BAQ rows complete successfully with no errors. I thought I had it. But without changing a thing, sometimes, I get only two rows to process. Can anyone confirm that server issues could be causing this behavior in pilot?

Still experiencing the same issues today. The first time I ran it, all 4 rows completed correctly. A few minutes later when I ran it a second time, without changing anything, only one or two rows were processed and I got the server error.

Is this the kind of issue I should send to tech support?

For what it is worth, here is the BAQ for you to check out. It does seem to work, but I get that server error almost every time, but not EVERY time.

ChangePartResourceGroupID_8-15-19.baq (233.9 KB)

This BAQ assumes you at least have the ECO group “MU” setup for mass updates. Besides the ECO group, you will need a set of parts with an old resource group ID you want to change, and a new resource group ID you want to change to. Both new and old resource group IDs must be valid. This function uses the resource group description to populate the operation description.

If anyone knows why I am experiencing the server error, or has any idea how to stop it, please let me know!
Thanks!
Nate