"Release for Picking" Intermittent Failure

Hello all,

I am struggling to track down an unexpected side effect of a customization I made to automate a part of Fulfillment Workbench.

I have been tasked with creating an Epicor Function that is supposed to use newly created inventory to satisfy (allocate) any open demands at the time of job completion in order to optimize picking.

At the end of a job, the operator has the ability to perform an immediate inventory transfer and allocation via a button on a custom Web form that hosts a couple optimizations/automations via Epicor Functions over REST API (including MES). The operator is then instructed (via the form) to drop some/all material off in an order staging bin (located physically next to the final operation with a place-to-light system also integrated). The Epicor Function does not release the inventory for picking (a member of our sales team does). These integrations avoid having the operator move material into the main inventory room only for our picker to move it back to the pre-shipping area shortly after. In almost every case, a demand exists for a job at the time of completion.

Anyways, this all seems to work (in Pilot) except for an intermittent failure when “Releasing For Picking” in fulfillment workbench. When releasing multiple demands that were fulfilled with the customization, some (but not all) of the demands fail to get moved to the “picking” state. I’ve ensured the order is fully fulfilled before trying to release it.

I have tried many variations and I can’t seem to identify a pattern for which demands fail. I get no error or any other indicator that there was a failure besides that fact that the allocated quantity is not moved to the picking column and they aren’t included when asked to print the “material queue report”. I traced the ReleaseForPicking feature on an instance where four demands were “SelectedForAction” but only two demands got moved to “Picking”. Below, I show the state of “SelectedForPicking” before each method → after each method. “false/true” indicates that the two demands that ultimately failed are false and the two that succeeded were true.

“SelectedForPicking”

AutoPick() : all false → all false
GetFWBLimitedRefresh() : false → false
OrderAllocationGetRows() : all false → all true
// something is happening here?
OrderRelUpdate() : false/true → false/true
SubmitForPicking() : false/true → false/true
GetFWBLimitedRefresh() : false/true → false/true
OrderAllocationGetRows() : false/true → false/true

I was hoping to see the “SelectedForPicking” transition from before to after a specific method, but that seems not to be the case. Does it make sense to conclude that some logic in the client is causing this? Otherwise I would see it change from the input to output of a single method?

Does anyone know of tools for debugging logic that appears to be occurring in the client rather than the server (if that makes sense)?
Any ideas on what about my allocation functions (which I’ve posted about here) might be causing this behavior?