Kinetic BPM

Hello,
I have one UD field in ECORev and two UD fields in ECOMtl
i need calculate one UD field in ECOMtl with the following formula

ECOMtl.UD2 = ECOMtl.UD1 * ECORev.UD1
I though it is very easy. I just set fields in the BPM and then give the formula.
but unfortunately, it is not what I thought.
the event is in the update. but I tested sometimes I got 0 for ds.ECORev.UD1 even it has value. sometimes I got ds.ECOMtl.UD1 = 0.
so my ECOMtl.UD2 is always 0.

just want to know without using ds, can I use DB.ECORev and DB.ECOMtl like the classic BPM.

my goal is either ECOREv.UD1 or ECOMtl.UD1 got modified, ECOMtl.UD2 get updated.

how to do it in the Kinetic BPM.

thanks,

Eddy

A bpm is a bpm, if the data you need is not available, just go get it from the db object or appropriate bo.

1 Like

yes, but there is a problem. this is my workflow in the bpm.
the event is in post processing.
first I get the engworkbench dataset. and then i read the ecorev to get the UD1. and then read the ecomtl to do the calculation.
but I can not call the update function to update again.

it kind of recursive call.

regards,

Eddy

@naruto - Put in message boxes in the BPM with the field values, to see if there’s even data in the fields (if it’s passed with the Post data set). If not, add variables, and use 1 line of code to get access to the field data.

https://www.epiusers.help/t/simple-one-liner-c-to-retrieve-data-from-a-table/44627/17

I can retrieve the data use Invoke BO method and put into variable.
but the problem is when I call InvokeBO method to update EngineerWorkBanch, it doesn’t work.
I think because my bpm is in update in EngineerWorkBanch and in the bpm call update method again and Kinetic doesn’t like it.

regards,

Eddy

Hello,
finally I found a way to do it in BPM.

in the pre-processing, I put a condition on my ECORev.UD1 changed-row.
then I create a variable to hold the new Value for UD1 and then invoke BO to overwrite the current ds. to do that, now, I have ECOMtl datatable populated. then I am doing my simple formula for my ECOMtl.UD2 field also I need put back the new value for ECORev.UD1.
finally, it worked.

regards,

Eddy

1 Like