Creating objects in a loop produces one empty object

0
Hi guys, this seems a lil strange to me and may to you too, i have a scenario where i for test reasons need to make a lot of order objects associates with products objects. based on random integers i choose products from a totall product list (by counting till it hits the random int, if hit than associate product with new order, etc). what I see now is that from the 7th object "order" there are no products associated. when debugging with 1 seconds between activities in the microflow I see that the all order objects are associated with products object... so, is there a way to slow down the microflow with a delay or something (between creating one object after another)? it keeps strange..but may this is known bug or something to you? thnx
asked
2 answers
0

With the following code in a custom java action you can create a wait action. The input parameter is a long value indicating the time to wait in milliseconds.

    // BEGIN USER CODE
    Thread.sleep(timeInMs);
    return true;
    // END USER CODE

I do however think that the issue that you are experiencing is not due to the speed at which the records are created and there is another cause. Maybe you can share the microflow and explain the model to get an answer for your issue that solves the problem correctly.

answered
0

Do you commit in a loop?

answered