I have a User management custom composite API, which takes care of creating RMP user accounts, if they do not already exist (we are checking for an existing user by using the Query for RMP user connector).
This API is consumed primarily from Invitation based RMP processes. Now, there are scenarios wherein the User Management API gets invoked from a number of spawned Invitation Processes (bulk - spawned async using Jquery Ajax), which causes the remote call to Query RMP user by Email to fail with errors indicating the hit frequency to be too high. I want to introduce a brief random delay in the individual Invitation Processes using a RMP Timer, but could not figure out a way to add a formula driven "second" based delay timer as a Timer seems to be supporting a minimum of 5 minutes delay only?
Is there a way I can create a few seconds random delay period on a Process step?
Thanks!
We will want to use this script as either an input or output variable in one of the steps in the process. Also, please note that this is javascript and we don't want to mix Freemarker with it.
<@script env="javascript">
/* wait 500ms */
var start = Date.now() ;
var right_t = start;
while((right_t-start) < 500) {
right_t = Date.now();
}
print(right_t-start);
</@script>
====
Thanks,
Craig
Now that you have responded to the question, it helps me to explain: I have a need to add the delay when I spawn the reference request processes on submission of a nomination. Points to note:
* Nomination submission client side code is already doing a ton of other work and needs to be optimized. I was not willing to put a JS level delay but let's discuss if there are no feasible alternatives
* The delay cannot be significant (5min +) because the subsequent view on the landing page is rendered out of the spawned process web interface report
On Thursday, September 26, 2013 4:38:32 PM UTC-7, somesh.m...@gmail.com wrote: