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
Thank you for stopping by. Please leave a comment if this help you. Share and like!! :)
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
That's all in this post. Hope this will be helpful.var waitTime = function(milliseconds) {
log.info("Wait time for " milliseconds" + milliseconds start");
java.lang.Thread.sleep(milliseconds);
log.info("wait time over");
}
waitTime(2000);
Thank you for stopping by. Please leave a comment if this help you. Share and like!! :)
This IBM App Connect Enterprise V11 training covers concepts from Basic level to advance level. Whether you are an individual or corporate client we can customize training course content as per your requirement. And can arrange this IBM App Connect Enterprise V11 training at your pace.
ReplyDeleteIBM APP Connect Enterprise (ACE) V11, which was earlier known as “IBM Integration Bus” or “WebSphere Message Broker” is basically IBM's Integration Broker from the WebSphere product family that authorizes business information to flow between various applications across multiple hardware and software platforms.
Complete Customization of IBM App Connect Enterprise V11 course content is possible for Individual students and for Corporate.
Email: contact@maxmunus.com
Call / WhatsApp: +91903588898