UD01 - UpdateExt Triggering BPM multiple times

I working with an external system that is pushing records into our UD01 table.

I’m trying to set it up so that it sends out a “received” status back to the external system via REST within a Post-Processing directive on the UpdateExt method for UD01.

In my testing, I can trigger it through the swagger UI and I can see that it executes the BPM once. However when the external system sends a record through, the BPM gets triggered multiple times. The external system can only receive the “Received” status once, any other attempts throws an exception error on the other side.

I haven’t looked in the external system yet to see if the issue is coming from there, but I’d like to rule out if there’s something else I should be using or considering when using this method.

Did you try to validate the RowMod? maybe an Enable post Processing when rowmod == “U” or “A”

I’ve added validation for rowmod == A, however it looks like it’s getting triggered at least twice. From what I can tell, the external request is only being sent once, so I assume the UpdateExt method should be triggered once in this case, but it’s not.

Note that UpdateExt should be calling Update, so you might try moving your BPM to the UPDATE process… otherwise things that call update directly will not trigger your BPM (unless that was intentional).

but anytime someone says that their BPM does things twice, it typically means that they are not checking the ROWMOD variable, looking for the non-blank ROWMOD… when rowmod is blank, it is the unedited value, and when it is populated (with A for ADD or U for UPDATE), then it is the modified record. Typically that is the record you are interested, and should only look at the populated ROWMOD record.

1 Like

I tried putting my BPM in the Update method, but it doesn’t seem to get triggered when the api call is sent to UpdateExt. I’m using UD01, would there be anything specific that I’d need to consider?

Did some troubleshooting, I’m not sure if I’m doing something incorrect here. But I tested the BPM without the REST API call and it seems to behave correctly when it receives the data from the external system. But when I enable the API call to update that system, it seems to trigger the UpdateExt method again.

Want Some Teddy Bear GIF by Pudgy Penguins

If you do that logic in an Epicor Function, you can still call it via REST, not bleed Kinetic logic into your client, be able to assigned an Access Scope, and probably reduce the number of calls over the wire.

Unfortunately the version of Epicor I’m dealing with here doesn’t have Functions. Which is why I’m trying to accomplish this all within a method or data directive.

Wha if you try to move your logic to a data directive validating the rowmod equals to “A”?

If you havent got functions. Do a UBAQ. You can populate a calculated field with the received once the code has finished.

2 Likes

Pretty much. Anything you can do in a function, you can do with a UBAQ. (Advanced BPM Mode)

1 Like