How to Pause Without Blocking Job Queue in One Identity Manager Scripts?

I’m developing scripts for a customer in One Identity Manager and noticed that using Thread.Sleep tends to block the Job Queue, making the entire process slower. Since the process involves bulk operations with many items in the queue, I’m looking for a more efficient way to pause or wait without blocking other jobs. Is there a recommended approach on the Job Server, such as waiting for events or using a more efficient timer, to optimize this kind of scenario?

Parents
  • Hi Barry, Can I use it on a script?

  • No, it's a process step component.  Perhaps if you explained your full use case / issue, the forum might be able to help.

  • In my script, I check whether an API request was successful or failed, and based on the result, I close the IT Shop request accordingly. To perform this check, the script needs to wait for the API response to confirm success or failure. Depending on the error returned, I also want to add a specific reason to the IT Shop decision. I can send it to you check

  • If this is a real 2 step API call, i.e. first do the API request, wait then do a second request for the status, I would advise to split those into 2 scripts that are called in 2 process steps. You can use out-values in case you need to pass information between the steps (like a sessionID), or you put them in a (custom) field in your basetable. Those 2 steps can be in a single process, advised if the result is available somewhat fast (minutes). Or you can have schedule and separate process for the second "resultcollection", advised if you want/can process multiple results and/or the results take longer to get (like result from an external ticketing system).

    If it is really just 1 API call that takes rather long to finish, you are out of luck speeding the script up. In that case I would advise to configure a (or multiple) separate JobQueue for just processing those Jobs, maybe with an increased number of EXTERNAL slots. That way they do not block the rest of the system while waiting.

Reply
  • If this is a real 2 step API call, i.e. first do the API request, wait then do a second request for the status, I would advise to split those into 2 scripts that are called in 2 process steps. You can use out-values in case you need to pass information between the steps (like a sessionID), or you put them in a (custom) field in your basetable. Those 2 steps can be in a single process, advised if the result is available somewhat fast (minutes). Or you can have schedule and separate process for the second "resultcollection", advised if you want/can process multiple results and/or the results take longer to get (like result from an external ticketing system).

    If it is really just 1 API call that takes rather long to finish, you are out of luck speeding the script up. In that case I would advise to configure a (or multiple) separate JobQueue for just processing those Jobs, maybe with an increased number of EXTERNAL slots. That way they do not block the rest of the system while waiting.

Children
No Data