Automic Workload Automation

 View Only

  • 1.  Wait for REST API call

    Posted Jul 25, 2024 02:21 AM

    Hello Community,

    I want to create a JOBS within a JOBP, which interrupt the processing chain.

    The JOBP should only continue, if a REST API Call has triggered for this specific JOBS.

    I have experience with Rest API JOBS with Promptsets, but not aware how I can break and wait for the call until continuation.

    Thank you for your ideas and help
    Robert



  • 2.  RE: Wait for REST API call

    Posted Jul 26, 2024 10:55 AM

    Hello Robert,

    I didn't find a command to stop a workflow with REST API
    but stopping a process is possible with scripts command TOGGLE_OBJECT_STATUS

    So, by using 2 script objects

    One to stop the automated process
    :SET &RUNNR# = GET_UC_OBJECT_NR(JOBP.WORKFLOW)
    :SET &RET# = TOGGLE_OBJECT_STATUS(&RUNNR#, "STOP")

    And one to release it
    :SET &RUNNR# = GET_UC_OBJECT_NR(JOBP.WORKFLOW)
    :SET &RET# = TOGGLE_OBJECT_STATUS(&RUNNR#, "GO")

    and start those scripts with REST API to stop/release your workflow, it could work.

    Hope this is helpful for you

    Stéphane




  • 3.  RE: Wait for REST API call

    Posted Jul 31, 2024 02:22 AM

    Not sure if I understood you right. You have a JOBS Object that is started via REST and you have a workflow that depends on this execution. So basically you are waiting for an external signal.

    One way to accomplish this is to put an external dependency in the workflow waiting for that JOBS object to be executed.



    ------------------------------
    ☎️ Swisscom Automation Engineer & 🧙 PE Membership Creator

    Automic Kurse, Tutorials, Tools und mehr auf:
    https://membership.philippelmer.com/
    Zwei Wochen kostenlos testen!
    ------------------------------