Hi everyone,
I'm working with an Orchestrated Process that calls an external API. Currently, all requests hit the endpoint simultaneously, causing it to return a 500 Internal Server Error
due to overload. I'm seeing errors like this in the logs:
(2025-06-03 01:27:21.697) [810222] Error running script 'CCC_Custom_Universidade_ASAD'.
[System.Net.WebException] The remote server returned an error: (500) Internal Server Error.
at StdioProcessor.StdioProcessor._Execute(Job job)
at VI.JobService.JobComponents.ScriptComponent.Activate(String task)
at VI.JobService.JobComponents.ScriptComponent._TaskScriptExec()
at VI.DB.Scripting.ScriptRunner.Eval(String key, Object[] parameters)
---- Start of Inner Exception ----
at DynScripts.Scripts_YJbLef26FdtP02l5bRVmtvwiRlf5MWGx.CCC_Custom_Universidade_DASA(String identificacao)
at System.Net.WebClient.UploadData(Uri address, String method, Byte[] data)
at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
The script making the API call is CCC_Custom_Universidade_ASAD
. I've included the full script below for reference.
My goal is to introduce a random delay within this process so that the API requests are staggered, preventing the endpoint from being overwhelmed.
Does anyone know if there's a built-in component or a recommended method in One Identity Manager (within an Orchestrated Process or a script like this) to achieve a random delay? I'm looking for a way to pause the execution for a random period (e.g., between 1 to 5 minutes) before each API call.
Any ideas or examples would be greatly appreciated!
Thanks in advance.