I’m calling this RESTAPI URL: Shipment/ConfirmShipment
Using a body:
{"entity":{"Type":{"value":"Shipment"},"ShipmentNbr":{"value":"SH00788384"}},"parameters":{}}
Question: how long do I need to wait between calls to this URL?
I get an empty response back when successful but if I don’t wait at least 5 seconds before I call the next Shipment/ConfirmShipment RESTAPI URL, I get this response:
{"message":"An error has occurred.","exceptionMessage":"Operation failed","exceptionType":"PX.Data.PXInvalidOperationException","stackTrace":" at PX.Api.ContractBased.EntityService.Invoke(ISystemContract systemContract, String version, String name, EntityImpl entity, ActionImpl action, CbOperationContext operationContext, Boolean throwOnError)\r\n at PX.Api.ContractBased.AspNetCore.CbEndpointFeatureServiceExtensions.Invoke(IEntityService entityService, ICbEndpointFeature feature, EntityImpl entity, ActionImpl action, CbOperationContext operationContext)\r\n at PX.Api.ContractBased.WebApi.Controllers.ActionController.InvokeAction(String objectName, String actionName, ActionInvocation invocation)\r\n at lambda_method(Closure , Object , Object[] )\r\n at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeActionMethodAsync>d__12.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__13.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext()","innerException":{"message":"An error has occurred.","exceptionMessage":"The previous operation has not been completed yet.","exceptionType":"PX.Data.PXException","stackTrace":" at PX.Concurrency.Internal.RuntimeLongOperationManager.StartOperationImpl(Object key, Byte[] timeStamp, Action`1 method, Boolean forceAsync) in C:\\build\\code_repo\\NetTools\\PX.Data\\Concurrency\\Internal\\RuntimeLongOperationManager.cs:line 96\r\n at PX.Concurrency.LongOperationManager.StartOperation(Object key, Byte[] timeStamp, Action`1 method) in C:\\build\\code_repo\\NetTools\\PX.Data\\Concurrency\\LongOperationManager.cs:line 95\r\n at PX.Data.PXLongOperation.StartOperation(PXGraph graph, PXToggleAsyncDelegate method) in C:\\build\\code_repo\\NetTools\\PX.Data\\Concurrency\\PXLongOperation.cs:line 71\r\n at WeSupplyDeliveryTracking.SOShipmentEntryWeSupplyExt.ConfirmShipmentAction(PXAdapter adapter, ConfirmShipmentActionDelegate baseMethod) in C:\\Users\\ttook\\source\\repos\\Acumatica\\Projects.git\\WeSupplyDeliveryTracking\\WeSupplyDeliveryTracking\\SOShipmentEntryWeSupplyExt.cs:line 34\r\n at PX.Data.PXAction`1.RunHandler(PXAdapter adapter) in C:\\build\\code_repo\\NetTools\\PX.Data\\Descriptor\\Action\\PXAction.cs:line 1515\r\n at PX.Data.PXAction`1.<Press>d__39.MoveNext() in C:\\build\\code_repo\\NetTools\\PX.Data\\Descriptor\\Action\\PXAction.cs:line 1288\r\n at PX.Data.PXAction`1.<Press>d__39.MoveNext() in C:\\build\\code_repo\\NetTools\\PX.Data\\Descriptor\\Action\\PXAction.cs:line 1247\r\n at PX.Api.SyImportProcessor.SyStep.PressButton(PXAction button, PXAdapter adapter, SyView view, String actionName, Object[] currents) in C:\\build\\code_repo\\NetTools\\PX.Data\\Api\\Export\\SyImport\\ImportProcessor.cs:line 3753\r\n at PX.Api.SyImportProcessor.SyStep.CommitChangesInt(Object itemToBypass, PXFilterRow[] targetConditions, PXFilterRow[] filtersForAction, SyImportRowResult importResult) in C:\\build\\code_repo\\NetTools\\PX.Data\\Api\\Export\\SyImport\\ImportProcessor.cs:line 3652\r\n at PX.Api.SyImportProcessor.SyStep.CommitChanges(Object& itemToBypass, PXFilterRow[] targetConditions, PXFilterRow[] filtersForAction) in C:\\build\\code_repo\\NetTools\\PX.Data\\Api\\Export\\SyImport\\ImportProcessor.cs:line 5385\r\n at PX.Api.SyImportProcessor.ExportTableHelper.ExportTable(CancellationToken token) in C:\\build\\code_repo\\NetTools\\PX.Data\\Api\\Export\\SyImport\\ImportProcessor.cs:line 1400"}}
