In-Transaction vs Standard Data Directive

Is someone able to explain the differences of a In-Transaction vs Standard Data Directive? I think I mistakenly/improperly discovered what a In-Transaction BPM’s purpose was when I thought i was doing things in the temp tables in the screen. When in fact my records were still being written to the database and my bpm was firing because of that.

So why would i use one over the other if they both fire when being written to the DB?

I believe in-transaction allows the update to stop, so it’s between the database and the BO, whereas the standard is after the update occurs.
There’s a diagram somewhere that explains it better, let me see if I can find it

Page 548 of the Epicor ICE tools guide (for 10.2.600)

5 Likes

In-Trans: You still have the opportunity to change data BEFORE it gets written to the DB. You can also abort the transaction if desired at this point
Standard: The data has already been written to the DB. You cannot stop or reverse the change. it is done. but you can act on the fact that something has changed, and do some other action such as: update another UD Table, Send an EMAIL, etc.

10 Likes

Additionally, if a record is written multiple times to the database during the BO method call, in-transaction directive will be triggered multiple times, every time the data is sent to the DB, whereas standard directive is triggered once, after the BO method call completes, and contains all the added/updated/deleted records for the table, in their latest state.

1 Like

@Aaron_Moreng @timshuwy @AMS

Just wanted to thank you all for your replies. I now have a better understanding.

3 Likes

Hello Tim, thank you for your explanation of standard verses In-transaction data directives. I have an additional question on this topic. If you have both types which type gets run first? I have a BPM where I need a Standard that checks a UD boolean, if false I send an email. Then I needed an In-Transaction(IT) do set the same boolean to false. Will the IT set my boolean to true before I check it? Does the order field work for both types, I.e. I can set the order to 10 for the standard that does the checking then set the IT that does the setting to true?

in trans is always before the data is written, so it is first… then the standard happens AFTER the data is written.

Thanks again Tim, I’m not asking for a solve here but If I need to email based on one condition(true) then set the value to false so the email doesn’t get sent again, is there a way for that? This seems like a catch 22 for me, where I can’t email in one type or set the value in the other…

not quite sure how to resolve this… in regular BPMs we would use “pre” and “POST processing BPMs as a pair… the pre-processing would enable the post processing BPM, and then the post processing would send the email and reset the value and re-save it. this is complex, and not for the faint-hearted.

You can use callContextBPM data for that. Have your condition check if it’s true, and if it is, then set something the BPM call context then uncheck the field. Then in your standard, look for the call context BPM that you set, send the email, then clear the call context BPM field.

4 Likes