In IBM BPM we can use the Timer events in the BPDs to introduce the waiting period but we don't have any direct implementation of the timer in the service flows (or the server-side scripts). In this post, I'll explain a simple way to use the existing Java class in the script to simulate the time delays in the server-side logic. Below image shows the implementation of it. In the above example, I have used the java.lang.Thread.sleep() method to add the desired delay. The best part of this implementation is we don't need to import any additional package or classes the time is accurate to the milliseconds and not random and different when we try to use the counter and for/while loop Below is the script for reference var waitTime = function(milliseconds) { log.info("Wait time for " milliseconds" + milliseconds start"); java.lang.Thread.sleep(milliseconds); log.info("wait time over"); } waitTime(2000); That's all i...
In this blog, I have accumulated the solutions to the issues and learning that I collect while working in IBM BPM. The product is improving every year version by version but still, it lacks many features that is expected to be done in the product. Hope you find solutions to some of your problems here.