Automic Workload Automation

 View Only
Expand all | Collapse all

Calling a JOBP from an EXEC VARA

Michael A. Lowry

Michael A. LowryApr 03, 2023 06:48 AM

  • 1.  Calling a JOBP from an EXEC VARA

    Posted Mar 30, 2020 11:46 AM
    Edited by Michael A. Lowry Mar 31, 2020 03:35 AM
    I'd like to call a JOBP to an EXEC VARA. The data to be returned to the calling EXEC VARA will be generated by the child job(s) of the workflow. It is not possible in this case to simply call a child JOBS object directly from the EXEC VARA. Is there any way to get data back from the workflow to the calling EXEC VARA?

    When I try to :PUBLISH the data sequence from the child job to the parent workflow, the EXEC VARA gets only the data sequence identifier and not the contents. (My guess is that this data sequence ID has meaning only within the context of the run ID of the child job.)


    Is there any way to do this? If not, then the ability to call a JOBP from an EXEC VARA is rather useless.


  • 2.  RE: Calling a JOBP from an EXEC VARA

    Posted Mar 31, 2020 02:56 AM
    Hi Michael

    How does your code look like? Below is what I use to accomplish this in a JOBS PostProcess. If it's not working directly with a JOBP, you might still go for a SCRI based wrapper logic?

    :SET &STATUS_PROCESS_HND# = CREATE_PROCESS(NEW)
    :SET &RET# = PUT_PROCESS_LINE(&STATUS_PROCESS_HND#, 'Server§Message§', '§')
    :SET &RET# = PUT_PROCESS_LINE(&STATUS_PROCESS_HND#, &FEEDBACK#, '§')
    :PSET &STATUS_PROCESS# = SAVE_PROCESS(&STATUS_PROCESS_HND#)

    Regards
    Joel

    ------------------------------
    Swisscom Automation Engineer & PE Membership Creator

    Entfessle mehr Automic Wissen mehr Automic Tools
    https://membership.philippelmer.com/
    ------------------------------



  • 3.  RE: Calling a JOBP from an EXEC VARA

    Posted Mar 31, 2020 03:39 AM
    Edited by Michael A. Lowry Mar 31, 2020 04:01 AM
    In this situation, I cannot use a wrapper SCRI. It must be a workflow. Moreover, JOBPs have no post-process tab so there appears to be no way to create the data sequence in the JOBP context, but only after the child tasks have completed.

    For what it’s worth, I have tried running CREATE_PROCESS in the JOBP’s Process tab, and then PUT_PROCESS_LINE in the child task, but this does not work.


  • 4.  RE: Calling a JOBP from an EXEC VARA

    Posted Mar 31, 2020 03:27 AM
    Hi @Michael A. Lowry,

    I can - at least - confirm, that it doesn't work to pass a handle from a JOBP's child back to the calling VARA.EXEC. However, it's possible to pass a plain variable (see screen shot):




    Cheers
    Christoph


    ​​

    ------------------------------
    ----------------------------------------------------------------
    Automic AE Consultant and Trainer since 2000
    ----------------------------------------------------------------
    ------------------------------



  • 5.  RE: Calling a JOBP from an EXEC VARA

    Posted Mar 31, 2020 03:46 AM
    Edited by Michael A. Lowry Mar 31, 2020 03:46 AM
    Thanks, @Christoph Rekers. That's helpful. In this situation though, I need to return a list of values, so this unfortunately won't work.


  • 6.  RE: Calling a JOBP from an EXEC VARA

    Posted Mar 31, 2020 04:29 AM
    Edited by Christoph Rekers Apr 01, 2020 03:19 AM
    ah...and I forgot to mention that a handle can be passed to the VARA.EXEC if the handle is created in the "direct" child (see screen shot):





    Cheers
    Christoph 



    ------------------------------
    ----------------------------------------------------------------
    Automic AE Consultant and Trainer since 2000
    ----------------------------------------------------------------
    ------------------------------



  • 7.  RE: Calling a JOBP from an EXEC VARA

    Posted Mar 31, 2020 06:53 AM
    Edited by Michael A. Lowry May 12, 2020 11:11 AM
    Yep, that's also what I observed. What we need is one of the following:
    • A post-process tab for workflows.
    • Some way of publishing a data sequence to the workflow level from a child task.



  • 8.  RE: Calling a JOBP from an EXEC VARA

    Posted Apr 01, 2020 09:39 AM
    Edited by Michael A. Lowry May 12, 2020 11:12 AM
    I tried using an array to pass a list of values to the calling EXEC VARA. This also did not work. When an array is used as the result variable, no results at all are returned to the EXEC VARA.


  • 9.  RE: Calling a JOBP from an EXEC VARA

    Posted Apr 01, 2020 09:52 AM
    Have you tried create_process and LOAD_PROCESS?

    Cheers
    Christoph

    ------------------------------
    ----------------------------------------------------------------
    Automic AE Consultant and Trainer since 2000
    ----------------------------------------------------------------
    ------------------------------



  • 10.  RE: Calling a JOBP from an EXEC VARA

    Posted Apr 01, 2020 10:14 AM
    Edited by Michael A. Lowry Apr 01, 2020 10:15 AM
    @Christoph Rekers: No, I haven't. Where would one run LOAD_PROCESS?
    ​​


  • 11.  RE: Calling a JOBP from an EXEC VARA

    Posted Apr 01, 2020 10:27 AM
    Well, JobB could load the process that JobA has created and merge it with its own process, e.g. merge Windows-File#1 (PREP_PROCESS_FILE) with Unix-File#2 (PREP_PROCESS_FILE). I don't have a real use case right now...

    Cheers
    Christoph 


    ------------------------------
    ----------------------------------------------------------------
    Automic AE Consultant and Trainer since 2000
    ----------------------------------------------------------------
    ------------------------------



  • 12.  RE: Calling a JOBP from an EXEC VARA

    Posted Apr 02, 2020 08:14 AM
    Edited by Michael A. Lowry Apr 02, 2020 08:15 AM
    Well, JobB could load the process that JobA has created and merge it with its own process, e.g. merge Windows-File#1 (PREP_PROCESS_FILE) with Unix-File#2 (PREP_PROCESS_FILE). I don't have a real use case right now...

    That does not help, because it is still at the level of the task within the workflow, not the workflow itself.


  • 13.  RE: Calling a JOBP from an EXEC VARA

    Posted Apr 02, 2020 09:33 AM
    Edited by Michael A. Lowry May 12, 2020 11:10 AM
    This is not a complete work-around, but it might help in some cases:
    Parse delimited string and create data sequence

    This would allow the following scenario:
    1. The called JOBP returns a delimited string instead of an array or data sequence.
    2. The object using the EXEC VARA parses the delimited string.
    This will obviously not work in places where the VARA must return a data sequence directly, e.g., prompt set combo box controls. It will obviously also not help in situations where multiple columns of data must be returned.


  • 14.  RE: Calling a JOBP from an EXEC VARA
    Best Answer

    Posted May 13, 2020 05:28 AM
    Edited by Christopher Hackett Jun 01, 2020 02:37 PM
    I created a new enhancement request for this. Please vote for it if you like the idea.

    Post-process tab for workflows




  • 15.  RE: Calling a JOBP from an EXEC VARA

    Posted Apr 03, 2023 06:48 AM
    Edited by Michael A. Lowry Apr 03, 2023 06:47 AM

    Broadcom deleted the idea.