Process will not end...leads to heap error

Ok, I tried this a few places. How many should I have? Also, is there a time penalty for doing this?

Identify the activities which you need to execute it in one transaction . In the above example, i can set 3 transaction boundaries for checkout cart, charge credit and deliver product. Starting the instance and adding products to cart can be executed in one transaction. Again, it depends on the business case.

Transaction boundaries can be set to activities wherever the ACID properties need to met.

1 Like

Ok. There’s one concern, I have a step that’s taking an inordinate amount of time, it’s the “Extract Customer Values” script. Most of my boxes average something like .0005-.0046 seconds each. This one though averages .031 seconds. This box does nothing but extract data from a large json by using this:

def currentElement = getOutageDataResponse.prop(“sqlResponseData”).elements()[banIndex];
execution.setVariable(“ban”,currentElement.prop(“BAN”).stringValue());
execution.setVariable(“state”,currentElement.prop(“SERVICE_STATE”).stringValue());
execution.setVariable(“timeZone”,currentElement.prop(“TIME_ZONE”).stringValue());
execution.setVariable(“banStatus”,currentElement.prop(“BAN_STATUS”).stringValue());

Any ideas why this particular block takes so long?

As you said that your json payload is huge and you’re searching for multiple properties in that huge payload will probably take time. But seeing the time taken for that process is reasonable :slight_smile:

If it concerns, then set the each variable in the multi-instance activity, so that searching each property in that huge payload will be parallelised.

Is there a method for speeding it up? Would it be better to pull data in smaller pieces?

Refer the above post (updated)

I see it. When I say a LOT of data, I’m talking 5k records. Would it help to reduce it to 2k?

Ok, I managed to get it down, but I have another segment that is taking a long time in a code box…

def updateCBRList = execution.getVariable(“updateCBRList”);
def updatedBan= S(‘{}’);
updatedBan.prop(“BAN”,ban);
updatedBan.prop(“CBR”,cbr);
updateCBRList.append(updatedBan);
execution.setVariable(“updateCBRList”,updateCBRList);

This is taking a log more time than I think it probably should. If I don’t do the execution.getVariable, then it will only work on the current data and not what is already there. Is there some way of fixing this?

Ok. I think I got this arranged, but I noticed that I am getting DB locking errors:

“org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of ‘DELETE MessageEntity[55c32512-2065-11eb-9d1b-c8d9d2a6236e]’ failed. Entity was updated by another transaction concurrently.”

Sorry if I’m new to this, but how do I fix it? Do I even need to fix it?