IBM Security QRadar SOAR

 View Only
  • 1.  Stop workflow for a random time

    Posted Thu June 01, 2023 08:46 AM

    Hi, I would like to write a script that stops the workflow for a random time between 0-300 seconds, how can I do it?

    I Receive Message :



    ------------------------------
    Łukasz Tyński
    ------------------------------


  • 2.  RE: Stop workflow for a random time

    Posted Thu June 01, 2023 10:25 AM

    As of right now sleep() is not supported



    ------------------------------
    Richard Swierk
    ------------------------------



  • 3.  RE: Stop workflow for a random time

    Posted Tue September 19, 2023 04:34 PM

    Greetings!

    Sleep is not allowed in the script, as you can see.

    I suggest installing one of the official IBM Apps in the exchange, that come in with a "Timer" function you can directly add as an step in your workflow:

    https://exchange.xforce.ibmcloud.com/hub?q=timer

    For random time, in the function pre-process, you can generate a random time with python, just as you are doing in the script, and pass it to the function with "inputs.nameoftheinput = random.randrange(10)"

    Hope this helps!

    Cheers,



    ------------------------------
    Pol Estecha Hernández
    ------------------------------